Public report of neondatabase/electric, published 17 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, 17 November 2026, 04:45 UTC · Survey ID cd_ee9c2ba9b4194faa9a16d8f82267ac8d
neondatabase/electric
Measured 17 November 2026, 04:44 UTC, at code version 3f9809f
Test reliability is not measured: No runner for the .ex half of a polyglot repository.
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 268,290 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 2.5 person-years · Weakest lens: Production Readiness, 41.2
Findings by how serious they are
429 critical1271 serious429 minor
8 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
17 November 2026, 04:44 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 ▸
86of 86 dimensions measured by tools.
2023of 2129 findings point to an exact file and line, so you can open each one in the code. The other 106 concern the repository as a whole, such as missing documentation.
86dimensions across 7 lenses, read from 268,290 lines of product code in 20 projects.
neondatabase/electric is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back in part because it has uses of packages that aren't listed. It scores 47.6 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 41.2, is the weakest lens and counts most in the score. The best first step is putting upper bounds on the open-ended dependency requirements, worth about 5.5 points. Tidying the declared packages would lift Production Readiness itself, worth about 4.3 points. Raising Production Readiness to 70 would lift the score to about 53.1.
152 known security holes in the packages the code depends on can be used by attackers. 147 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and thirty-eight secrets can leak from the build pipeline. Updating the vulnerable packages, pinning each tool to an exact version and limiting each secret to its own step would close these risks. Passing outside input through environment variables would fix the 15 pipeline steps that put outside input straight into a shell command, and the 11 unsafe settings in infrastructure or container files need changing to safe values. The four controls that only work with a mouse need to work with the keyboard, or to become a real button.
The product code is 268,290 lines, about €360,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 Production Readiness rose from 41.2 to 70, the lowest score rated Strong, the score would rise from 47.6 to about 53.1.
Code composition: what the lines of code are
Product code 67%Tests 33%
Rebuild cost: about €360,000 · Estimate
Cost to rebuild
€120,000 to €600,000, for 2,005 to 6,359 hours of work, about 2.5 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. 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
Large: 268,290 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
Resolve the 4 Unbounded dependency requirement finding(s) in Dependency Hygiene.
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 4.3 points · Medium effort · Dependency Hygiene
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €360,000 to build again, about 2.5 person-years of work. Its weakest lens is Production Readiness, at 41.2 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 4 Unbounded dependency requirement finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 5.5 points for low effort, because it clears the 4 Dependency Hygiene findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
434 modules, with 469 dependencies between them. 6 loops run through 14 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 394 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.
durable_streams.api uses durable_streams.store, so a change to durable_streams.store can break durable_streams.api, while a change to durable_streams.api can't break durable_streams.store.
Position
Below the diagonal: durable_streams.api uses a module listed above it, which is the healthy direction.
packages.agents-desktop.src.shared.types uses packages.agents-mcp.src.types, so a change to packages.agents-mcp.src.types can break packages.agents-desktop.src.shared.types, while a change to packages.agents-desktop.src.shared.types can't break packages.agents-mcp.src.types.
Position
Below the diagonal: packages.agents-desktop.src.shared.types uses a module listed above it, which is the healthy direction.
packages.agents-mcp.src.registry uses packages.agents-mcp.src.types, so a change to packages.agents-mcp.src.types can break packages.agents-mcp.src.registry, while a change to packages.agents-mcp.src.registry can't break packages.agents-mcp.src.types.
Position
Below the diagonal: packages.agents-mcp.src.registry uses a module listed above it, which is the healthy direction.
13→16 packages.agents-runtime.src.define-entity uses packages.agents-runtime.src.typespart of a loop✕
Connections
2 pairs of types, where a type in packages.agents-runtime.src.define-entity uses a type in packages.agents-runtime.src.types.
packages.agents-runtime.src.define-entity uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-runtime.src.define-entity, while a change to packages.agents-runtime.src.define-entity can't break packages.agents-runtime.src.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
packages.typescript-client.src.client uses packages.typescript-client.src.types, so a change to packages.typescript-client.src.types can break packages.typescript-client.src.client, while a change to packages.typescript-client.src.client can't break packages.typescript-client.src.types.
Position
Below the diagonal: packages.typescript-client.src.client uses a module listed above it, which is the healthy direction.
durable_streams.sse_reactor uses durable_streams.store, so a change to durable_streams.store can break durable_streams.sse_reactor, while a change to durable_streams.sse_reactor can't break durable_streams.store.
Position
Below the diagonal: durable_streams.sse_reactor uses a module listed above it, which is the healthy direction.
durable_streams.sse_reactor uses durable_streams.api, so a change to durable_streams.api can break durable_streams.sse_reactor, while a change to durable_streams.sse_reactor can't break durable_streams.api.
Position
Below the diagonal: durable_streams.sse_reactor uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.types uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-runtime.src.types, while a change to packages.agents-runtime.src.types can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-runtime.src.types uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.types uses packages.agents-runtime.src.define-entity, so a change to packages.agents-runtime.src.define-entity can break packages.agents-runtime.src.types, while a change to packages.agents-runtime.src.types can't break packages.agents-runtime.src.define-entity.
Position
Below the diagonal: packages.agents-runtime.src.types uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib.server-connection uses packages.agents-server-ui.src.lib.types, so a change to packages.agents-server-ui.src.lib.types can break packages.agents-server-ui.src.lib.server-connection, while a change to packages.agents-server-ui.src.lib.server-connection can't break packages.agents-server-ui.src.lib.types.
Position
Below the diagonal: packages.agents-server-ui.src.lib.server-connection uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib.server-connection uses packages.agents-desktop.src.shared.types, so a change to packages.agents-desktop.src.shared.types can break packages.agents-server-ui.src.lib.server-connection, while a change to packages.agents-server-ui.src.lib.server-connection can't break packages.agents-desktop.src.shared.types.
Position
Below the diagonal: packages.agents-server-ui.src.lib.server-connection uses a module listed above it, which is the healthy direction.
17→19 packages.agents-server-ui.src.lib.server-connection uses packages.agents-desktop.src.cloud.cloud-authpart of a loop✕
Connections
1 pair of types, where a type in packages.agents-server-ui.src.lib.server-connection uses a type in packages.agents-desktop.src.cloud.cloud-auth.
packages.agents-server-ui.src.lib.server-connection uses packages.agents-desktop.src.cloud.cloud-auth, so a change to packages.agents-desktop.src.cloud.cloud-auth can break packages.agents-server-ui.src.lib.server-connection, while a change to packages.agents-server-ui.src.lib.server-connection can't break packages.agents-desktop.src.cloud.cloud-auth.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
durable_streams.wal.shard uses durable_streams.store, so a change to durable_streams.store can break durable_streams.wal.shard, while a change to durable_streams.wal.shard can't break durable_streams.store.
Position
Below the diagonal: durable_streams.wal.shard uses a module listed above it, which is the healthy direction.
durable_streams.wal.shard uses durable_streams.sse_reactor, so a change to durable_streams.sse_reactor can break durable_streams.wal.shard, while a change to durable_streams.wal.shard can't break durable_streams.sse_reactor.
Position
Below the diagonal: durable_streams.wal.shard uses a module listed above it, which is the healthy direction.
packages.agents-desktop.src.cloud.cloud-auth uses packages.agents-server-ui.src.lib.server-connection, so a change to packages.agents-server-ui.src.lib.server-connection can break packages.agents-desktop.src.cloud.cloud-auth, while a change to packages.agents-desktop.src.cloud.cloud-auth can't break packages.agents-server-ui.src.lib.server-connection.
Position
Below the diagonal: packages.agents-desktop.src.cloud.cloud-auth uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.entity-timeline uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-runtime.src.entity-timeline, while a change to packages.agents-runtime.src.entity-timeline can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-runtime.src.entity-timeline uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.runtime-server-client uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-runtime.src.runtime-server-client, while a change to packages.agents-runtime.src.runtime-server-client can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-runtime.src.runtime-server-client uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.runtime-server-client uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-runtime.src.runtime-server-client, while a change to packages.agents-runtime.src.runtime-server-client can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-runtime.src.runtime-server-client uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.skills uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-runtime.src.skills, while a change to packages.agents-runtime.src.skills can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-runtime.src.skills uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src.skills uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-runtime.src.skills, while a change to packages.agents-runtime.src.skills can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-runtime.src.skills uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.hooks uses packages.agents-server-ui.src.lib.types, so a change to packages.agents-server-ui.src.lib.types can break packages.agents-server-ui.src.hooks, while a change to packages.agents-server-ui.src.hooks can't break packages.agents-server-ui.src.lib.types.
Position
Below the diagonal: packages.agents-server-ui.src.hooks uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.hooks uses packages.agents-server-ui.src.lib.server-connection, so a change to packages.agents-server-ui.src.lib.server-connection can break packages.agents-server-ui.src.hooks, while a change to packages.agents-server-ui.src.hooks can't break packages.agents-server-ui.src.lib.server-connection.
Position
Below the diagonal: packages.agents-server-ui.src.hooks uses a module listed above it, which is the healthy direction.
durable_streams.wal.walset uses durable_streams.sse_reactor, so a change to durable_streams.sse_reactor can break durable_streams.wal.walset, while a change to durable_streams.wal.walset can't break durable_streams.sse_reactor.
Position
Below the diagonal: durable_streams.wal.walset uses a module listed above it, which is the healthy direction.
durable_streams.wal.walset uses durable_streams.wal.shard, so a change to durable_streams.wal.shard can break durable_streams.wal.walset, while a change to durable_streams.wal.walset can't break durable_streams.wal.shard.
Position
Below the diagonal: durable_streams.wal.walset uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src uses packages.agents-runtime.src.define-entity, so a change to packages.agents-runtime.src.define-entity can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-runtime.src.define-entity.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
36 pairs of types, where a type in packages.agents-runtime.src uses a type in packages.agents-runtime.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
packages.agents-runtime.src uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src uses packages.agents-runtime.src.entity-timeline, so a change to packages.agents-runtime.src.entity-timeline can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-runtime.src.entity-timeline.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
packages.agents-runtime.src uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-runtime.src, while a change to packages.agents-runtime.src can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-runtime.src uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-server-ui.src.lib.types, so a change to packages.agents-server-ui.src.lib.types can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-server-ui.src.lib.types.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-desktop.src.shared.types, so a change to packages.agents-desktop.src.shared.types can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-desktop.src.shared.types.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-server-ui.src.lib.server-connection, so a change to packages.agents-server-ui.src.lib.server-connection can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-server-ui.src.lib.server-connection.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.lib uses packages.agents-desktop.src.cloud.cloud-auth, so a change to packages.agents-desktop.src.cloud.cloud-auth can break packages.agents-server-ui.src.lib, while a change to packages.agents-server-ui.src.lib can't break packages.agents-desktop.src.cloud.cloud-auth.
Position
Below the diagonal: packages.agents-server-ui.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server.src.electric-agents-types uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server.src.electric-agents-types, while a change to packages.agents-server.src.electric-agents-types can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server.src.electric-agents-types uses a module listed above it, which is the healthy direction.
packages.agents-server.src.electric-agents-types uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-server.src.electric-agents-types, while a change to packages.agents-server.src.electric-agents-types can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-server.src.electric-agents-types uses a module listed above it, which is the healthy direction.
packages.agents-server.src.electric-agents-types uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-server.src.electric-agents-types, while a change to packages.agents-server.src.electric-agents-types can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-server.src.electric-agents-types uses a module listed above it, which is the healthy direction.
packages.electric-ax.src uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.electric-ax.src, while a change to packages.electric-ax.src can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.electric-ax.src uses a module listed above it, which is the healthy direction.
packages.electric-ax.src uses packages.agents-runtime.src.entity-timeline, so a change to packages.agents-runtime.src.entity-timeline can break packages.electric-ax.src, while a change to packages.electric-ax.src can't break packages.agents-runtime.src.entity-timeline.
Position
Below the diagonal: packages.electric-ax.src uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.components uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server-ui.src.components, while a change to packages.agents-server-ui.src.components can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server-ui.src.components uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.components uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-server-ui.src.components, while a change to packages.agents-server-ui.src.components can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-server-ui.src.components uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.components uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-server-ui.src.components, while a change to packages.agents-server-ui.src.components can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-server-ui.src.components uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.components uses packages.agents-runtime.src.entity-timeline, so a change to packages.agents-runtime.src.entity-timeline can break packages.agents-server-ui.src.components, while a change to packages.agents-server-ui.src.components can't break packages.agents-runtime.src.entity-timeline.
Position
Below the diagonal: packages.agents-server-ui.src.components uses a module listed above it, which is the healthy direction.
packages.agents-server-ui.src.components uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-server-ui.src.components, while a change to packages.agents-server-ui.src.components can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-server-ui.src.components uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-registry uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server.src.entity-registry, while a change to packages.agents-server.src.entity-registry can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server.src.entity-registry uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-registry uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-server.src.entity-registry, while a change to packages.agents-server.src.entity-registry can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-server.src.entity-registry uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-registry uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-server.src.entity-registry, while a change to packages.agents-server.src.entity-registry can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-server.src.entity-registry uses a module listed above it, which is the healthy direction.
packages.agents-mobile.src.lib uses packages.agents-runtime.src.composer-input, so a change to packages.agents-runtime.src.composer-input can break packages.agents-mobile.src.lib, while a change to packages.agents-mobile.src.lib can't break packages.agents-runtime.src.composer-input.
Position
Below the diagonal: packages.agents-mobile.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-mobile.src.lib uses packages.agents-server-ui.src.lib.server-connection, so a change to packages.agents-server-ui.src.lib.server-connection can break packages.agents-mobile.src.lib, while a change to packages.agents-mobile.src.lib can't break packages.agents-server-ui.src.lib.server-connection.
Position
Below the diagonal: packages.agents-mobile.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-mobile.src.lib uses packages.agents-desktop.src.cloud.cloud-auth, so a change to packages.agents-desktop.src.cloud.cloud-auth can break packages.agents-mobile.src.lib, while a change to packages.agents-mobile.src.lib can't break packages.agents-desktop.src.cloud.cloud-auth.
Position
Below the diagonal: packages.agents-mobile.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-mobile.src.lib uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-mobile.src.lib, while a change to packages.agents-mobile.src.lib can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-mobile.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-mobile.src.lib uses packages.agents-server-ui.src.components, so a change to packages.agents-server-ui.src.components can break packages.agents-mobile.src.lib, while a change to packages.agents-mobile.src.lib can't break packages.agents-server-ui.src.components.
Position
Below the diagonal: packages.agents-mobile.src.lib uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-bridge-manager uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.entity-bridge-manager, while a change to packages.agents-server.src.entity-bridge-manager can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.entity-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-bridge-manager uses packages.typescript-client.src.types, so a change to packages.typescript-client.src.types can break packages.agents-server.src.entity-bridge-manager, while a change to packages.agents-server.src.entity-bridge-manager can't break packages.typescript-client.src.types.
Position
Below the diagonal: packages.agents-server.src.entity-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-bridge-manager uses packages.typescript-client.src.client, so a change to packages.typescript-client.src.client can break packages.agents-server.src.entity-bridge-manager, while a change to packages.agents-server.src.entity-bridge-manager can't break packages.typescript-client.src.client.
Position
Below the diagonal: packages.agents-server.src.entity-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-bridge-manager uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.entity-bridge-manager, while a change to packages.agents-server.src.entity-bridge-manager can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.entity-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.entity-manager uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.entity-manager, while a change to packages.agents-server.src.entity-manager can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.entity-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.pg-sync-bridge-manager uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.pg-sync-bridge-manager, while a change to packages.agents-server.src.pg-sync-bridge-manager can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.pg-sync-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.pg-sync-bridge-manager uses packages.typescript-client.src.types, so a change to packages.typescript-client.src.types can break packages.agents-server.src.pg-sync-bridge-manager, while a change to packages.agents-server.src.pg-sync-bridge-manager can't break packages.typescript-client.src.types.
Position
Below the diagonal: packages.agents-server.src.pg-sync-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.pg-sync-bridge-manager uses packages.typescript-client.src.client, so a change to packages.typescript-client.src.client can break packages.agents-server.src.pg-sync-bridge-manager, while a change to packages.agents-server.src.pg-sync-bridge-manager can't break packages.typescript-client.src.client.
Position
Below the diagonal: packages.agents-server.src.pg-sync-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.pg-sync-bridge-manager uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.pg-sync-bridge-manager, while a change to packages.agents-server.src.pg-sync-bridge-manager can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.pg-sync-bridge-manager uses a module listed above it, which is the healthy direction.
packages.agents-server.src.runtime uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.runtime, while a change to packages.agents-server.src.runtime can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.runtime uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.runtime, while a change to packages.agents-server.src.runtime can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.runtime uses packages.agents-server.src.entity-bridge-manager, so a change to packages.agents-server.src.entity-bridge-manager can break packages.agents-server.src.runtime, while a change to packages.agents-server.src.runtime can't break packages.agents-server.src.entity-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.runtime uses packages.agents-server.src.entity-manager, so a change to packages.agents-server.src.entity-manager can break packages.agents-server.src.runtime, while a change to packages.agents-server.src.runtime can't break packages.agents-server.src.entity-manager.
Position
Below the diagonal: packages.agents-server.src.runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.runtime uses packages.agents-server.src.pg-sync-bridge-manager, so a change to packages.agents-server.src.pg-sync-bridge-manager can break packages.agents-server.src.runtime, while a change to packages.agents-server.src.runtime can't break packages.agents-server.src.pg-sync-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing.context uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.routing.context, while a change to packages.agents-server.src.routing.context can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.routing.context uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing.context uses packages.agents-server.src.entity-bridge-manager, so a change to packages.agents-server.src.entity-bridge-manager can break packages.agents-server.src.routing.context, while a change to packages.agents-server.src.routing.context can't break packages.agents-server.src.entity-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.routing.context uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing.context uses packages.agents-server.src.entity-manager, so a change to packages.agents-server.src.entity-manager can break packages.agents-server.src.routing.context, while a change to packages.agents-server.src.routing.context can't break packages.agents-server.src.entity-manager.
Position
Below the diagonal: packages.agents-server.src.routing.context uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing.context uses packages.agents-server.src.pg-sync-bridge-manager, so a change to packages.agents-server.src.pg-sync-bridge-manager can break packages.agents-server.src.routing.context, while a change to packages.agents-server.src.routing.context can't break packages.agents-server.src.pg-sync-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.routing.context uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing.context uses packages.agents-server.src.runtime, so a change to packages.agents-server.src.runtime can break packages.agents-server.src.routing.context, while a change to packages.agents-server.src.routing.context can't break packages.agents-server.src.runtime.
Position
Below the diagonal: packages.agents-server.src.routing.context uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.entity-bridge-manager, so a change to packages.agents-server.src.entity-bridge-manager can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.entity-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.entity-manager, so a change to packages.agents-server.src.entity-manager can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.entity-manager.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.pg-sync-bridge-manager, so a change to packages.agents-server.src.pg-sync-bridge-manager can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.pg-sync-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.standalone-runtime uses packages.agents-server.src.runtime, so a change to packages.agents-server.src.runtime can break packages.agents-server.src.standalone-runtime, while a change to packages.agents-server.src.standalone-runtime can't break packages.agents-server.src.runtime.
Position
Below the diagonal: packages.agents-server.src.standalone-runtime uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.routing, while a change to packages.agents-server.src.routing can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.routing uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-server.src.routing, while a change to packages.agents-server.src.routing can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-server.src.routing uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-server.src.routing, while a change to packages.agents-server.src.routing can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-server.src.routing uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src.routing, while a change to packages.agents-server.src.routing can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src.routing uses a module listed above it, which is the healthy direction.
packages.agents-server.src.routing uses packages.agents-server.src.routing.context, so a change to packages.agents-server.src.routing.context can break packages.agents-server.src.routing, while a change to packages.agents-server.src.routing can't break packages.agents-server.src.routing.context.
Position
Below the diagonal: packages.agents-server.src.routing uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-server.src.stream-client, so a change to packages.agents-server.src.stream-client can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-server.src.stream-client.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-runtime.src.define-entity, so a change to packages.agents-runtime.src.define-entity can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-runtime.src.define-entity.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-server.src.entity-bridge-manager, so a change to packages.agents-server.src.entity-bridge-manager can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-server.src.entity-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-server.src.pg-sync-bridge-manager, so a change to packages.agents-server.src.pg-sync-bridge-manager can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-server.src.pg-sync-bridge-manager.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-server.src.routing.context, so a change to packages.agents-server.src.routing.context can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-server.src.routing.context.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src.server uses packages.agents-server.src.standalone-runtime, so a change to packages.agents-server.src.standalone-runtime can break packages.agents-server.src.server, while a change to packages.agents-server.src.server can't break packages.agents-server.src.standalone-runtime.
Position
Below the diagonal: packages.agents-server.src.server uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-mobile.src.lib.agentsClient, so a change to packages.agents-mobile.src.lib.agentsClient can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-mobile.src.lib.agentsClient.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-runtime.src.types, so a change to packages.agents-runtime.src.types can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-runtime.src.types.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-runtime.src.runtime-server-client, so a change to packages.agents-runtime.src.runtime-server-client can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-runtime.src.runtime-server-client.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.electric-agents-types, so a change to packages.agents-server.src.electric-agents-types can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.electric-agents-types.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.entity-registry, so a change to packages.agents-server.src.entity-registry can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.entity-registry.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.entity-bridge-manager, so a change to packages.agents-server.src.entity-bridge-manager can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.entity-bridge-manager.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.routing.context, so a change to packages.agents-server.src.routing.context can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.routing.context.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.standalone-runtime, so a change to packages.agents-server.src.standalone-runtime can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.standalone-runtime.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
packages.agents-server.src uses packages.agents-server.src.server, so a change to packages.agents-server.src.server can break packages.agents-server.src, while a change to packages.agents-server.src can't break packages.agents-server.src.server.
Position
Below the diagonal: packages.agents-server.src uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 49.9 · Weak · gated by R3, X4 ·
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
288
High / Critical
A05:2025 — Injection
252
High / Critical
A02:2025 — Security Misconfiguration
30
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 4 Unbounded dependency requirement finding(s) in Dependency Hygiene; Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies; Resolve the 1 Retired release finding(s) in Dependency Hygiene.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 4 Unbounded dependency requirement finding(s) in Dependency Hygiene.
Set an explicit timeout on every client — `recv_timeout:` for HTTPoison, `receive_timeout:` for Req and Finch, `Tesla.Middleware.Timeout` (or the adapter's `recv_timeout`) for Tesla, `timeout:` for `:httpc` — and add retries with back-off (`Tesla.Middleware.Retry`, Req's `retry:`) and a breaker (`:fuse`, `ExternalService`) around dependencies that fail.
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.
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 — 429
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 — 1271
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 — 429
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 8
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 86 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 — 86 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, 2023 of 2129 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: this repository's production source spans .ts, .tsx, .ex, and our analyzer cannot run the .ex test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 75.4% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 2,462 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 196 test source file(s) (.exs, .ex) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — 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 reliability NOT SCORED: this repository's production source includes .ex, and the built-in reliability runner cannot re-run the .ex test suite(s) — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/agents-walkthrough/ (1 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/tanstack-db-web-starter/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents/ (96 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents-mcp/ (89 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents-mobile/ (88 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents-runtime/ (1043 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents-server/ (490 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents-server-conformance-tests/ (0 tests)): measured (30 flaky) suite(s) did re-run, and came back with 30 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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. `packages/agents-desktop/src/cli/controller.ts`, `packages/agents-desktop/src/ipc/chrome.ts`, `packages/agents-desktop/src/preload.ts`, `packages/agents-runtime/src/define-entity.ts`, `packages/agents-runtime/src/entity-stream-db.ts`, … (+13 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.
AC6 Visual & motion safety — 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. 79 further occurrence(s) are not listed individually; the score already reflects all 119.
AX6 Interface segregation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (examples/linearlite/backend/docker-compose.yml). compose up failed (exit 1 — a container did not start, exited, or never became healthy) — Error response from daemon: driver failed programming external connectivity on endpoint pglite-linearlite-backend-1 (1c580e256cd817c8fa4a05d6c6c5734830fd7b976117fccba3fd04e90e751459): failed to bind port 0.0.0.0:3000/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:3000: bind: address already in use; runtime evidence skipped.
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.
C2 Access Controls — 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 authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — 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 audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — 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 retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — 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 data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
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.
R10 Code Duplication — 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. 294 further occurrence(s) are not listed individually; the score already reflects all 334.
R2 Cyclomatic Complexity — 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. 224 further occurrence(s) are not listed individually; the score already reflects all 264.
R3 Large Files — 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. 52 further occurrence(s) are not listed individually; the score already reflects all 92.
R4 Test Coverage — 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. 193 further occurrence(s) are not listed individually; the score already reflects all 233.
R7 Dead Code — 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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
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. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X13 Undrained process stream — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X16 Unfloored truncation loop — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X17 Uncapped recursion over a caller-supplied document — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X18 Disposal-pattern correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X19 Unrestored process-global state — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X21 Side-effecting pattern guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X23 Unguarded diagnostic materialisation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X25 Inert configuration knob — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X29 Per-element action decided by a fixed element — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — 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. 64 further occurrence(s) are not listed individually; the score already reflects all 104.
X30 Support guard that admits what it rejects — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X4 Structured logging — 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. 46 further occurrence(s) are not listed individually; the score already reflects all 86.
X7 Silent fallback defaults — 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. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
Repo exclusion declarations: 53 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
148 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was EntityTimeline.EntityTimeline at 116. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being expression-compiler.compileFunction at 19 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/typescript-client/src/expression-compiler.ts (expression-compiler.compileFunction at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 135 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with EntityTimeline.EntityTimeline (cyclomatic 116), process-wake.processWake (cyclomatic 105), MessageInput.MessageInput (cyclomatic 93). — 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 6 together lifts Cyclomatic Complexity from 5.9 to about 6.5/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.
+ 185 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with process-wake.processWake (cognitive 190), EntityTimeline.EntityTimeline (cognitive 131). — 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 Cognitive Complexity from 5.3 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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 Classes7.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 111 FunctionTooLong finding(s) in God Classes — start with OnboardingModal.tsx (6), EntityTimeline.tsx (3), pi-adapter.ts (3). — One of this dimension's main actionable groups (111 warning-level).
Resolve the 57 FileTooLong finding(s) in God Classes — start with entity-manager.ts, process-wake.ts, entity-registry.ts. — One of this dimension's main actionable groups (57 warning-level).
Resolve the 11 TooManyFunctions finding(s) in God Classes — start with config.ex, in_memory_storage.ex, shape_status.ex. — One of this dimension's main actionable groups (11 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.
21 duplicated block group(s) detected. 0.5 % of the production lines (1,453 of 268,290) are in a reported copy. A further 49 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 8 of the 70 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .ts, .tsx (71% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
Edited copy of a member (10 corresponding lines) · ×5packages/durable-streams-rust/src/blobstore.rs:229
Edited copy of a member (12 corresponding lines) · ×4packages/durable-streams-rust/src/blobstore.rs:121
Edited copy of a member (9 corresponding lines) · ×4packages/sync-service/lib/electric/shapes/shape.ex:698
Edited copy of a member (14 corresponding lines) · ×3packages/sync-service/lib/pg_interop/interval/iso8601_alternative_parser.ex:60
Edited copy of a member (15 corresponding lines) · ×3packages/durable-streams-rust/src/sse_reactor.rs:509
+ 38 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 blobstore.rs, subquery_index.ex, shape_cache.ex. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with blobstore.rs, querying.ex, shard.rs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with shape.ex, subquery_index.ex, application_telemetry.ex. — 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.
Do you agree with this assessment?
D5 · Coupling9.2 / 10Stronggated by 2 serious findings✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
19 production modules (Cargo+npm+OTP), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence.
Off the main sequence: electric_telemetry · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D10 · Test Quality9.8 / 10Stronggated by 30 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
2 skipped (2 with a documented reason), 29 zero-assertion, 1 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2462 tests. Measured on the JavaScript/TypeScript suite only — at least 196 test source file(s) (.exs, .ex) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: should infer generic row return type when no type is provided · ×29packages/typescript-client/test/client.test-d.ts:28
Fixed-sleep synchronisation: continues in-process when a new message arrives after the first handler passpackages/agents-runtime/test/process-wake.test.ts:2050
Mock-dominated test: should NOT set up wake detection timer in browser environments · ×23packages/typescript-client/test/wake-detection.test.ts:41
Resolve the 29 No assertions finding(s) in Test Quality — start with shape-stream-state.test.ts (13), client.test-d.ts (6), react-hooks.test-d.ts (3). — One of this dimension's main actionable groups (29 warning-level).
Resolve the 23 Mock-dominated test finding(s) in Test Quality — start with setup-context.test.ts (5), tag-stream-outbox-drainer.test.ts (4), standalone-runtime.test.ts (2). — One of this dimension's main actionable groups (23 recommendation-level).
Resolve the 1 Fixed-sleep synchronisation finding(s) in Test Quality — start with process-wake.test.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
53 outdated, 1 retired direct Hex dependencies, 4 pinning defect(s). Whether any of these packages is UNMAINTAINED is not graded — hex.pm publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: a Hex app name does not determine the modules it provides (`ecto_sql` provides Ecto.Adapters.SQL), and a large idiomatic class of BEAM dependencies — runtime adapters, codec plugins, protocol implementations and OTP applications the release starts — is correctly declared and never referenced in source, so absence of a reference is not evidence of an unused dependency. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 240 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with handlers.rs, client.ts, store.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.4 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
29 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/durable-streams-rust/src/wal/shard.rs. Counted over 494 of the 778 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×4
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
44 deducted task-comment markers across 224316 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.
Resolve the 36 TodoComment finding(s) in Explicit Debt — start with notification.tsx (4), electric-agents-tests.ts (3), api.ex (2). — One of this dimension's main actionable groups (36 warning-level).
Resolve the 5 FixmeComment finding(s) in Explicit Debt — start with cache.test.ts, client.test.ts, resource_detector.ex. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 3 XxxComment finding(s) in Explicit Debt — start with ChatInput.tsx (2), EventsList.tsx. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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 2 documentation facets pass in full; short on: F2 example. 119 document(s) read across 18 unit(s).
Documentation: no build, run or usage examplepackages/agents-mobile/README.md:1
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
3 naming inconsistencies among 56 declarations measured against a convention their peers follow.
`electronAPI` spells `API` where 42 names in the project spell it `Api`packages/agents-server-ui/src/lib/server-connection.ts:342
`#requestShapeSSE` spells `SSE` where 16 names in the project spell it `Sse`packages/typescript-client/src/client.ts:1733
`#hasBrowserVisibilityAPI` spells `API` where 42 names in the project spell it `Api`packages/typescript-client/src/client.ts:2002
What to do
Resolve the 1 `electronAPI` spells `API` where 42 names in the project spell it `Api` finding(s) in Naming Consistency — start with server-connection.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `#requestShapeSSE` spells `SSE` where 16 names in the project spell it… finding(s) in Naming Consistency — start with client.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `#hasBrowserVisibilityAPI` spells `API` where 42 names in the project… finding(s) in Naming Consistency — start with client.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the names · ×2packages/typescript-client/test/model-based.test.ts:945
What to do
Resolve the 26 redundant comment finding(s) in Comment Value — start with client.test.ts (4), electric-agents-dsl.ts (3), wake-registry.test.ts (3). — One of this dimension's main actionable groups (26 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D26 · Project Cohesion4.4 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
6 of 20 build units (Mix, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×6packages/sync-service/mix.exs:1
What to do
Resolve the 6 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (5), mix.exs. — One of this dimension's main actionable groups (6 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
252 finding(s): 0 critical, 215 high, 37 medium, 0 low. 147 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 23 file(s) — `examples/bash/client.bash` (line 104, line 119, line 122, …), `examples/tanstack-db-expo-starter/drizzle.config.ts` (lines 7–18), `packages/agents-desktop/src/cli/controller.ts` (line 129), `packages/agents-desktop/src/ipc/chrome.ts` (line 71), `packages/agents-desktop/src/preload.ts` (line 114), … (+18 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 12 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
+ 16 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 15 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED, REDACTED. — One of this dimension's main actionable groups (13 issue-level).
No action in Static Analysis (SAST) — all 147 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (147 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 135 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (110), REDACTED (23), REDACTED (2). — One of this dimension's main actionable groups (135 issue-level).
Resolve the 15 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (15). — One of this dimension's main actionable groups (15 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).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 14 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (14 warning-level).
Resolve the 11 High IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
110 of 494 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 494 of the 778 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 107 Orphaned file finding(s) in Knowledge Freshness — start with controller.ts (3), mcp.ts (2), SearchPalette.tsx. — One of this dimension's main actionable groups (107 recommendation-level).
Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with REDACTED, ShareSessionScreen.tsx, McpServerFormDialog.tsx. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with manager.ex, shape_cache.ex. — One of this dimension's main actionable groups (2 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.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 2 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 & labels4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×10) — packages/agents-mobile/src/components/SchemaArgsControls.tsx:340, packages/agents-mobile/src/components/SchemaArgsControls.tsx:377, packages/agents-mobile/src/components/SchemaArgsControls.tsx:418, …
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — packages/agents-server-ui/src/components/AttachmentDrafts.tsx:286
This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — packages/agents-server-ui/src/components/SchemaForm.tsx:367
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×2) — packages/agents-server-ui/src/components/SearchPalette.tsx:528, packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:155
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — packages/agents-server-ui/index.html:2, packages/agents/skills/quickstart/scaffold-ui/index.html:2
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 interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×3) — packages/agents-server-ui/src/components/ComposerShell.tsx:109, packages/agents-server-ui/src/components/stateExplorer/EventSidebar.tsx:170, packages/agents-server-ui/src/components/stateExplorer/StateTable.tsx:202
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. — packages/agents-server-ui/src/components/EntityHeader.tsx:199
This <div> announces itself as a role="separator" and is operated by mousedown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds). (×2) — packages/agents-server-ui/src/components/Sidebar.tsx:387, packages/agents-server-ui/src/components/workspace/Splitter.tsx:67
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
`.input-slider` 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. — website/src/components/pricing/PricingCalculator.vue:379
`.input` 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. (×2) — packages/agents-server-ui/src/ui/Combobox.module.css:41, packages/agents-server-ui/src/components/workspace/PaneFindBar.module.css:31
`.list` 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. — packages/agents-server-ui/src/ui/Combobox.module.css:50
`.item` 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. (×3) — packages/agents-server-ui/src/ui/Combobox.module.css:79, packages/agents-server-ui/src/ui/Menu.module.css:36, packages/agents-server-ui/src/ui/Select.module.css:149
`.popup` 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. (×4) — packages/agents-server-ui/src/ui/Dialog.module.css:37, packages/agents-server-ui/src/ui/Popover.module.css:39, packages/agents-server-ui/src/ui/Tooltip.module.css:15, …
`.viewport` 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. — packages/agents-server-ui/src/ui/ScrollArea.module.css:11
`.proseMirrorEditor` 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. — packages/agents-server-ui/src/components/MessageInput.module.css:222
`.slashArgumentValue` 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. — packages/agents-server-ui/src/components/MessageInput.module.css:382
`.modelSettingsSubmenuTrigger` 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. — packages/agents-server-ui/src/components/NewSessionPage.module.css:435
`.submenuTrigger` 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. (×3) — packages/agents-server-ui/src/components/SettingsMenu.module.css:27, packages/agents-server-ui/src/components/SidebarViewMenu.module.css:22, packages/agents-server-ui/src/components/workspace/SplitMenu.module.css:31
`.example form input[type='text']` 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. — examples/write-patterns/shared/app/style.css:94
`form input[type='text']` 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. — examples/encryption/src/Example.css:57
`.ag-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/AngelsGrid.vue:51
`.post-back-arrow` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/BlogPostHeader.vue:48
`.cc-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/ContactCards.vue:82
`.icon` moves (`transition: transform 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/LocalNavOutlineDropdown.vue:200
`.ld-tile` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/LogoDownloads.vue:59
`.sl-chip` moves (`transition: border-color 0.2s ease,
color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/SocialLinks.vue:71
`.tm-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/TeamMembers.vue:67
`.vc-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/VCsGrid.vue:51
`.mcp-source.pulse::after` moves (`animation: mcp-source-flash 0.7s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/sync-home/MultiClientPulseDemo.vue:443
`.mcp-demo.started .client-row` moves (`animation: mcp-row-in 0.4s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/sync-home/MultiClientPulseDemo.vue:602
`.qld-nav-dot` moves (`transition: background 200ms ease,
transform 200ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/sync-home/QueryLensDemo.vue:348
`.shape-carve.started .sc-row.matched` moves (`animation: sc-carve-in 0.5s ease-out backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/sync-home/ShapeCarveDemo.vue:469
`.shape-carve.started .sc-client-row` moves (`animation: sc-client-in 0.45s ease-out backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/sync-home/ShapeCarveDemo.vue:593
`.alf-blades` moves (`transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/AgentLoopFillDemo.vue:336
`.alf-event` moves (`transition: opacity 0.45s ease,
transform 0.45s ease,
border-color 0.45s ease,
background 0.45s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/AgentLoopFillDemo.vue:408
`.alf-event-rule` moves (`animation: alf-rule-grow 1.1s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/AgentLoopFillDemo.vue:444
`.alf-event-enter-active` moves (`transition: opacity 0.4s ease,
transform 0.4s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/AgentLoopFillDemo.vue:470
`.alf-event-move` moves (`transition: transform 0.45s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/AgentLoopFillDemo.vue:485
`.ig-card` moves (`transition: border-color 0.2s,
transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/IntegrationsGrid.vue:95
`.lg-card` moves (`transition: border-color 0.2s,
transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/src/components/streams-home/LayersGrid.vue:123
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 the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`RuntimeServerClient` declares 25 required operations: `sendEntityMessage`, `createAttachment`, `readAttachment`, `spawnEntity`, `forkEntity`, `getEntity`, `ensureSharedStateStream`, `signalEntity`, `ensureStream`, `deleteEntity`, `unregisterWake`, `getSharedStateStreamPath`, `registerWake`, `ensureCronStream`, `ensureEntitiesMembershipStream`, `registerPgSyncSource`, `listWebhookSources`, `subscribeToWebhookSource`, `unsubscribeFromWebhookSource`, `removePgSyncObservation`, `upsertCronSchedule`, `upsertFutureSendSchedule`, `deleteSchedule`, `setTag`, `deleteTag`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/agents-runtime/src/runtime-server-client.ts:121
`WakeSession` declares 16 required operations: `getPhase`, `registerManifestEntry`, `removeManifestEntry`, `commitManifestEntries`, `rollbackManifestEntries`, `registerSharedStateHandle`, `registerSpawnHandle`, `registerSourceHandle`, `enqueueSend`, `getManifest`, `getPendingSends`, `getSharedStateHandles`, `getSpawnHandles`, `getSourceHandles`, `finishSetup`, `close`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/agents-runtime/src/types.ts:808
`HandlerContext` declares 24 required operations: `useAgent`, `useContext`, `timelineMessages`, `insertContext`, `removeContext`, `getContext`, `listContext`, `setGoal`, `clearGoal`, `getGoal`, `markGoalComplete`, `updateGoalUsage`, `spawn`, `fork`, `forkSelf`, `unobserve`, `mkdb`, `send`, `onSignal`, `recordRun`, `replyText`, `sleep`, `setTag`, `deleteTag`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/agents-runtime/src/types.ts:1057
`SetupContextResult` declares 16 required operations: `spawn`, `fork`, `send`, `observe`, `createEffect`, `mkdb`, `getManifest`, `getPendingSends`, `getSharedStateHandles`, `getSpawnHandles`, `getSourceHandles`, `getSourceHandleCache`, `setInSetup`, `ensureObservedHandle`, `preloadDeferredObservedHandles`, `restorePersistedSharedStateHandles`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/agents-runtime/src/setup-context.ts:153
`ElectricCliHandlers` declares 16 required operations: `listTypes`, `inspectType`, `deleteType`, `spawn`, `send`, `observe`, `view`, `inspect`, `ps`, `signal`, `kill`, `start`, `startBuiltin`, `stop`, `quickstart`, `init`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/electric-ax/src/index.ts:90
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`stop` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/agents-desktop/src/cloud/cloud-agent-servers.ts:315
`onPress` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/agents-mobile/src/components/BottomSheet.tsx:162
The guard above `return FileJson;` also returns `FileJson`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/agents-server-ui/src/components/EntityTimeline.tsx:1129
`stopSync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/agents-server/src/wake-registry.ts:278
`applyShapeMessage` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/agents-server/src/wake-registry.ts:727
`initProject` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/electric-ax/src/init.ts:7
`setupTemplate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:24
`initialize` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — packages/agents-server-ui/src/embed/stubs/mermaid.ts:15, packages/agents-server/src/entity-registry.ts:210
`close` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/agents-server/src/entity-registry.ts:212
What to do
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
packages/durable-streams-rust/README.md links to `../../PROTOCOL.md`, but `PROTOCOL.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — packages/durable-streams-rust/README.md:3
website/docs/sync/reference/benchmarks.md names Postgres 14, but the manifest declares `postgres` ^3.4.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/sync/reference/benchmarks.md:216
website/docs/sync/reference/benchmarks.md names Postgres 15, but the manifest declares `postgres` ^3.4.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/sync/reference/benchmarks.md:237
What to do
Reconcile the README with reality: packages/durable-streams-rust/README.md links to `../../PROTOCOL.md`, but `PROTOCOL.md` does not exist; website/docs/sync/reference/benchmarks.md names Postgres 14, but the manifest declares `postgres` ^3.4.3; website/docs/sync/reference/benchmarks.md names Postgres 15, but the manifest declares `postgres` ^3.4.3.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability8.4 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 7/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `packages/agents-desktop`, `packages/agents-server-conformance-tests`, `packages/agents/skills/quickstart/scaffold`, `packages/electric-ax` and 3 more.
`packages/agents/src/bootstrap.ts` reports through `console.*` at line 485 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/bootstrap.ts:485
`packages/agents/src/bootstrap.ts` reports through `console.*` at line 487 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/bootstrap.ts:487
`packages/agents/src/durable-streams-cache.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/durable-streams-cache.ts:25
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 182 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:182
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 194 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:194
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 195 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:195
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:196
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:207
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 212 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:212
`packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 216 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents/src/entrypoint-lib.ts:216
`REDACTED` reports through `console.*` at line 458 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:458
`packages/agents-runtime/src/entity-stream-db.ts` reports through `console.*` at line 632 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-runtime/src/entity-stream-db.ts:632
`packages/agents-runtime/src/pull-wake-runner.ts` reports through `console.*` at line 221 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-runtime/src/pull-wake-runner.ts:221
`packages/agents-runtime/src/sandbox/docker/loader.ts` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-runtime/src/sandbox/docker/loader.ts:160
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 245 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:245
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 257 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:257
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 258 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:258
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 261 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:261
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 263 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:263
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 265 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:265
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 276 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:276
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 281 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:281
`packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 285 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/entrypoint-lib.ts:285
`packages/agents-server/src/runtime-registry.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/runtime-registry.ts:17
`packages/agents-server/src/scheduler.ts` reports through `console.*` at line 310 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/scheduler.ts:310
`packages/agents-server/src/scheduler.ts` reports through `console.*` at line 462 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/agents-server/src/scheduler.ts:462
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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.
`REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:4
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
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.
`Req.post(` 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. — packages/sync-service/lib/electric/telemetry/sentry_req_http_client.ex:12
What to do
Set an explicit timeout on every client — `recv_timeout:` for HTTPoison, `receive_timeout:` for Req and Finch, `Tesla.Middleware.Timeout` (or the adapter's `recv_timeout`) for Tesla, `timeout:` for `:httpc` — and add retries with back-off (`Tesla.Middleware.Retry`, Req's `retry:`) and a breaker (`:fuse`, `ExternalService`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
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.
`fsSync.mkdirSync` in `saveCache` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/agents-runtime/src/skills/registry.ts:145
`fs.existsSync` in `initProject` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/electric-ax/src/init.ts:11
`execSync` in `initProject` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/electric-ax/src/init.ts:20
`execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/start/src/cli.ts:236, packages/start/src/cli.ts:254
`execSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:34
`writeFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — REDACTED:60, REDACTED:73, REDACTED:95
`existsSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — REDACTED:67, REDACTED:79
`readFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — REDACTED:68, REDACTED:80
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety9.8 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
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.
77 duplicated blocks under packages/ have copies in at least two of the sibling directories agents, agents-desktop, agents-mcp, agents-mobile, agents-runtime, agents-server (+7 more sibling(s) not listed) — 60 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 77 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 77 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 77 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:9
5 duplicated blocks under packages/agents-mobile/src/ have copies in at least two of the sibling directories components, screens — 1 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/agents-mobile/src/components/SearchBar.tsx:80
5 duplicated blocks under packages/agents-server-ui/src/ have copies in at least two of the sibling directories components, hooks — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:239
5 duplicated blocks under packages/agents-server-ui/src/components/ have copies in at least two of the sibling directories settings, views, workspace — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32
packages/agents-runtime/src/tools/schedules.ts:49 · packages/agents-runtime/src/tools/webhook-sources.ts:20 — the two spans are one implementation copied and then locally edited — 927 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-runtime/src/tools/schedules.ts:49
REDACTED:9 · packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:13 — the two spans are one implementation copied and then locally edited — 936 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:9
packages/agents-server/src/entity-bridge-manager.ts:514 · packages/agents-server/src/entity-projector.ts:308 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server/src/entity-bridge-manager.ts:514
packages/agents-server/src/entrypoint-lib.ts:9 · packages/agents/src/entrypoint-lib.ts:5 — the two spans are one implementation copied and then locally edited — 425 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server/src/entrypoint-lib.ts:9
packages/agents-server/src/entity-bridge-manager.ts:55 · packages/agents-server/src/entity-projector.ts:44 — the two spans are one implementation copied and then locally edited — 458 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server/src/entity-bridge-manager.ts:55
packages/agents-mobile/src/screens/NewSessionScreen.tsx:498 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:214 — the two spans are one implementation copied and then locally edited — 354 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/screens/NewSessionScreen.tsx:498
packages/agents-server-ui/src/components/AgentResponse.tsx:644 · packages/agents-server-ui/src/components/AgentResponse.tsx:900 — the two spans are one implementation copied and then locally edited — 489 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server-ui/src/components/AgentResponse.tsx:644
packages/agents-mobile/src/screens/SessionScreen.tsx:604 · packages/agents-server-ui/src/components/MessageInput.tsx:181 — the two spans are one implementation copied and then locally edited — 416 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/screens/SessionScreen.tsx:604
packages/agents-mobile/src/screens/OnboardingScreen.tsx:49 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:40 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/screens/OnboardingScreen.tsx:49
scripts/ci/desktop-affected.mjs:3 · scripts/ci/mobile-affected.mjs:3 — these 2 files are line-for-line copies of one another — 72 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — scripts/ci/desktop-affected.mjs:3
packages/agents-server/src/utils/log.ts:1 · packages/agents/src/log.ts:1 — these 2 files are line-for-line copies of one another — 65 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/agents-server/src/utils/log.ts:1
packages/agents-server-ui/src/ui/Combobox.tsx:89 · packages/agents-server-ui/src/ui/Menu.tsx:43 — the two spans are one implementation copied and then locally edited — 311 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server-ui/src/ui/Combobox.tsx:89
packages/agents-mobile/src/lib/sessionBuckets.ts:28 · packages/agents-server-ui/src/lib/sessionGroups.ts:44 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/lib/sessionBuckets.ts:28
packages/agents-server/src/entity-manager.ts:2279 · packages/agents-server/src/runtime.ts:452 — the 2 copies are spread across 2 files, 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. — packages/agents-server/src/entity-manager.ts:2279
packages/agents-server/src/scheduler.ts:98 · packages/agents-server/src/scheduler.ts:331 — the two spans are one implementation copied and then locally edited — 223 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server/src/scheduler.ts:98
packages/experimental/tsup.config.ts:4 · packages/react-hooks/tsup.config.ts:4 — the 2 copies are spread across 2 files, 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. — packages/experimental/tsup.config.ts:4
packages/agents-server/src/entrypoint-lib.ts:227 · packages/agents/src/entrypoint-lib.ts:164 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server/src/entrypoint-lib.ts:227
packages/typescript-client/tsup.config.ts:13 · packages/y-electric/tsup.config.ts:10 — the 2 copies are spread across 2 files, 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. — packages/typescript-client/tsup.config.ts:13
packages/agents-mobile/src/lib/useEntityPermissions.ts:43 · packages/agents-server-ui/src/hooks/useEntityPermission.ts:48 — the two spans are one implementation copied and then locally edited — 310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/lib/useEntityPermissions.ts:43
packages/agents-mobile/src/screens/OnboardingScreen.tsx:650 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:264 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — packages/agents-mobile/src/screens/OnboardingScreen.tsx:650
packages/agents-mobile/src/lib/pinnedEntities.ts:12 · packages/agents-mobile/src/lib/savedServers.ts:32 — the two spans are one implementation copied and then locally edited — 246 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-mobile/src/lib/pinnedEntities.ts:12
packages/agents-server-ui/src/components/ServerPicker.tsx:69 · packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:78 — the 2 copies are spread across 2 files, 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. — packages/agents-server-ui/src/components/ServerPicker.tsx:69
packages/agents-desktop/src/cloud/cloud-auth.ts:132 · packages/agents-mobile/src/lib/cloudAuth.ts:181 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/agents-desktop/src/cloud/cloud-auth.ts:132
packages/agents-server-ui/src/ui/Code.tsx:20 · packages/agents-server-ui/src/ui/Text.tsx:27 — the 2 copies are spread across 2 files, 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. — packages/agents-server-ui/src/ui/Code.tsx:20
REDACTED:390 · REDACTED:429 — 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. — REDACTED:390
packages/agents-mobile/src/lib/sessionBuckets.ts:129 · packages/agents-server-ui/src/lib/sessionGroups.ts:87 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/agents-mobile/src/lib/sessionBuckets.ts:129
packages/typescript-client/src/shape-stream-state.ts:678 · packages/typescript-client/src/shape-stream-state.ts:767 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — packages/typescript-client/src/shape-stream-state.ts:678
packages/agents-desktop/src/shared/types.ts:216 · packages/agents-server-ui/src/lib/server-connection.ts:219 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — packages/agents-desktop/src/shared/types.ts:216
REDACTED:69 · packages/agents-runtime/src/types.ts:752 — the 2 copies are spread across 2 files, and the CITED SPAN is inside a TYPE DECLARATION, not executable code. There is no function to extract and no call site to call one from, so do not read this as an extract-a-helper row: the collapse a type offers is a generic — name the shape once, parameterised over the part that varies, and have each copy instantiate it. First check what actually differs between the copies: where they are a MATRIX of cases (one entry per input, differing precisely in the case each one pins), the repetition IS the enumeration and collapsing it would delete cases rather than de-duplicate anything — leave those alone. Reported because the copies that are not a matrix drift apart the first time only one of them is edited. — REDACTED:69
REDACTED:375 · REDACTED:416 — 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. — REDACTED:375
packages/agents-runtime/src/setup-context.ts:949 · packages/agents-runtime/src/setup-context.ts:1100 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/agents-runtime/src/setup-context.ts:949
packages/agents-runtime/src/setup-context.ts:1044 · packages/agents-runtime/src/setup-context.ts:1199 — 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. — packages/agents-runtime/src/setup-context.ts:1044
packages/agents-server-ui/src/hooks/useDarkMode.tsx:17 · packages/agents/skills/quickstart/scaffold-ui/main.tsx:41 — the two spans are one implementation copied and then locally edited — 225 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server-ui/src/hooks/useDarkMode.tsx:17
packages/agents-server-ui/src/ui/Box.tsx:12 · packages/agents-server-ui/src/ui/Stack.tsx:21 — the two spans are one implementation copied and then locally edited — 210 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/agents-server-ui/src/ui/Box.tsx:12
packages/agents-desktop/src/cloud/cloud-agent-servers.ts:410 · packages/agents-mobile/src/lib/cloudAgentServers.ts:276 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/agents-desktop/src/cloud/cloud-agent-servers.ts:410
packages/agents-mobile/src/components/HomeMenu.tsx:637 · packages/agents-server-ui/src/components/SidebarViewMenu.tsx:427 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/agents-mobile/src/components/HomeMenu.tsx:637
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 · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1891 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1891
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1907 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1907
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1922 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1922
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1942 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1942
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1966 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1966
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1990 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1990
packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1996 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1996
packages/agents-server/test/horton-pull-wake-e2e.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server/test/horton-pull-wake-e2e.test.ts:4
packages/agents-server/test/horton-spawn-worker.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server/test/horton-spawn-worker.test.ts:3
packages/agents-server/test/horton-title-generation.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/agents-server/test/horton-title-generation.test.ts:3
packages/durable-streams-rust/bench-latency/latency-probe.mjs:16 reaches into another package with a relative path (../../agents-server-conformance-tests/node_modules/@durable-streams/client/dist/index.js) — import the package by name instead. — packages/durable-streams-rust/bench-latency/latency-probe.mjs:16
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
(anonymous) has cyclomatic complexity 178 and cognitive complexity 267; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/typescript-client/src/client.ts:706
processWake has cyclomatic complexity 123 and cognitive complexity 207; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-runtime/src/process-wake.ts:434
executeStep has cyclomatic complexity 101 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:1083
(anonymous) has cyclomatic complexity 66 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-runtime/src/pi-adapter.ts:385
MessageInput has cyclomatic complexity 55 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/MessageInput.tsx:53
(anonymous) has cyclomatic complexity 46 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/y-electric/src/y-electric.ts:74
spawnInner has cyclomatic complexity 45 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/entity-manager.ts:636
wakeCallback has cyclomatic complexity 42 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/routing/internal-router.ts:669
LocalRuntimePage has cyclomatic complexity 40 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:151
forkSubtreeInner has cyclomatic complexity 39 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/entity-manager.ts:962
startRuntime has cyclomatic complexity 39 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-desktop/src/runtime/lifecycle.ts:188
checkStateProtocolInvariants has cyclomatic complexity 38 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:2387
NativeMessageComposer has cyclomatic complexity 38 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-mobile/src/screens/SessionScreen.tsx:495
ServerEntry has cyclomatic complexity 37 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/settings/pages/McpServersPage.tsx:154
SplitMenu has cyclomatic complexity 36 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:153
assembleContext has cyclomatic complexity 35 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-runtime/src/context-assembly.ts:213
CredentialsPage has cyclomatic complexity 34 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32
subscriptionWebhook has cyclomatic complexity 33 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/routing/internal-router.ts:427
remapManifestEntry has cyclomatic complexity 32 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/entity-manager.ts:2076
matchCondition has cyclomatic complexity 31 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/wake-registry.ts:908
ApiKeysForm has cyclomatic complexity 31 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/ApiKeysForm.tsx:72
SessionMenu has cyclomatic complexity 31 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-mobile/src/components/SessionMenu.tsx:122
extractManifestSourceUrl has cyclomatic complexity 30 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/manifest-side-effects.ts:13
AgentResponseLive 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. — packages/agents-server-ui/src/components/AgentResponse.tsx:464
(anonymous) has cyclomatic complexity 29 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-runtime/src/process-wake.ts:1769
buildElectricProxyTarget has cyclomatic complexity 29 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. — packages/agents-server/src/utils/server-utils.ts:112
AgentResponse has cyclomatic complexity 29 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/AgentResponse.tsx:876
handleKeyDown has cyclomatic complexity 28 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:752
DefaultAgentComposer has cyclomatic complexity 27 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/views/NewSessionView.tsx:887
formatAnalysisResult has cyclomatic complexity 26 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:518
buildConfig has cyclomatic complexity 26 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:141
assistantHandler has cyclomatic complexity 26 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. — packages/agents/src/agents/horton.ts:645
ToolBody has cyclomatic complexity 26 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. — packages/agents-server-ui/src/components/ToolCallView.tsx:142
loadDesktopSettings has cyclomatic complexity 26 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-desktop/src/settings/store.ts:134
ServerRow has cyclomatic complexity 26 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:250
parseConfig has cyclomatic complexity 25 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-mcp/src/config/loader.ts:22
runnerHealth has cyclomatic complexity 25 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. — packages/agents-server/src/routing/runners-router.ts:441
dockerSandbox 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. — packages/agents-runtime/src/sandbox/docker.ts:329
startStandaloneAgentsRuntime has cyclomatic complexity 24 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-server/src/standalone-runtime.ts:61
NewSessionScreen has cyclomatic complexity 24 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/agents-mobile/src/screens/NewSessionScreen.tsx:66
Do you agree with this assessment?
R3 · Large Files3.0 / 10Weak✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
packages/agents-server/src/entity-manager.ts has 3777 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/entity-manager.ts:1
packages/agents-server-conformance-tests/src/electric-agents-tests.ts has 3157 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1
packages/agents-runtime/src/process-wake.ts has 2503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/process-wake.ts:1
packages/typescript-client/src/client.ts has 2319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/typescript-client/src/client.ts:1
packages/agents-server-conformance-tests/src/electric-agents-dsl.ts has 2297 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:1
packages/agents-server-ui/src/components/EntityTimeline.tsx has 2090 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/EntityTimeline.tsx:1
packages/agents-server/src/entity-registry.ts has 2043 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/entity-registry.ts:1
packages/agents-runtime/src/entity-timeline.ts has 1821 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/entity-timeline.ts:1
packages/agents-mobile/src/screens/SessionScreen.tsx has 1761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-mobile/src/screens/SessionScreen.tsx:1
packages/agents-server-ui/src/components/views/NewSessionView.tsx has 1505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/views/NewSessionView.tsx:1
REDACTED has 1488 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/agents-runtime/src/context-factory.ts has 1278 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/context-factory.ts:1
packages/agents-server-ui/src/components/OnboardingModal.tsx has 1267 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/OnboardingModal.tsx:1
packages/agents-runtime/src/setup-context.ts has 1228 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/setup-context.ts:1
packages/agents-runtime/src/entity-schema.ts has 1212 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/entity-schema.ts:1
packages/agents-runtime/src/types.ts has 1175 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/types.ts:1
REDACTED has 1043 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/electric-ax/src/index.ts has 981 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/electric-ax/src/index.ts:1
packages/agents-server-ui/src/components/AgentResponse.tsx has 963 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/AgentResponse.tsx:1
packages/agents-runtime/src/runtime-server-client.ts has 926 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/runtime-server-client.ts:1
packages/agents/src/agents/horton.ts has 917 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents/src/agents/horton.ts:1
packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx has 904 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:1
packages/agents-server/src/wake-registry.ts has 891 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/wake-registry.ts:1
packages/agents-server/src/routing/internal-router.ts has 886 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/routing/internal-router.ts:1
packages/agents-server-ui/src/components/EntityContextDrawer.tsx has 854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/EntityContextDrawer.tsx:1
packages/electric-ax/src/observe-ui.tsx has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/electric-ax/src/observe-ui.tsx:1
packages/agents-runtime/src/entity-stream-db.ts has 804 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/entity-stream-db.ts:1
packages/agents-runtime/src/pi-adapter.ts has 764 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-runtime/src/pi-adapter.ts:1
REDACTED has 754 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/agents-server/src/scheduler.ts has 752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/scheduler.ts:1
packages/agents-server/src/entity-projector.ts has 747 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/entity-projector.ts:1
packages/agents-mobile/src/screens/ShareSessionScreen.tsx has 736 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-mobile/src/screens/ShareSessionScreen.tsx:1
packages/agents-server/src/stream-client.ts has 729 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/stream-client.ts:1
packages/agents-server/src/db/schema.ts has 727 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/db/schema.ts:1
packages/typescript-client/src/shape-stream-state.ts has 724 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/typescript-client/src/shape-stream-state.ts:1
packages/agents-server/src/routing/durable-streams-router.ts has 709 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server/src/routing/durable-streams-router.ts:1
packages/agents-mobile/src/screens/NewSessionScreen.tsx has 707 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-mobile/src/screens/NewSessionScreen.tsx:1
packages/agents-mobile/src/lib/cloudAuth.ts has 696 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-mobile/src/lib/cloudAuth.ts:1
packages/agents-server-ui/src/components/ShareEntityDialog.tsx has 687 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-server-ui/src/components/ShareEntityDialog.tsx:1
packages/agents-mobile/src/screens/OnboardingScreen.tsx has 680 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/agents-mobile/src/screens/OnboardingScreen.tsx: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 Coverage5.4 / 10Adequate✓ 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. (×40) — packages/agents-server-ui/src/components/EntityTimeline.tsx:1, packages/agents-mobile/src/screens/SessionScreen.tsx:1, packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code7.9 / 10Strong✓ 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 71 application, 61 tooling and 288 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×6) — packages/agents-mobile/src/components/HomeMenu.tsx, packages/agents-mobile/src/components/SessionRowMenu.tsx, packages/agents-mobile/src/lib/sessionBuckets.ts, …
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/app/index.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/screens/SessionListScreen.tsx
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/agents-mobile/src/components/SessionTree.tsx, packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/components/SessionRow.tsx
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (packages/agents-server-ui/src/embed/SessionChatLogDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionStateInspectorDomEmbed.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — packages/agents-server-ui/src/embed/EmbedApp.tsx, packages/agents-server-ui/src/embed/mobileDomRuntime.ts
no import path from any entry point (71 application, 61 tooling, 288 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 (×17) — packages/durable-streams-rust/bench-latency/run-latency-matrix.mjs, packages/agents-mobile/app/_layout.tsx, packages/agents-server-ui/src/embed/SessionChatLogDomEmbed.tsx, …
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/agents-mobile/src/components/HomeMenu.tsx, packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/lib/sidebarPrefs.ts
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/components/SessionTree.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/lib/expandedTree.ts
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/components/HomeMenu.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/lib/useAvailableServers.ts
no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/app/_layout.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/agents-mobile/src/lib/sentry.ts
Nothing imports this binding — it is safe to review for removal. (×8) — packages/agents-desktop/src/credentials/controller.ts:15, packages/agents-desktop/src/runtime/controller.ts:17, packages/agents-desktop/src/settings/mcp-defaults.ts:19, …
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 · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×4) — packages/agents/skills/quickstart/scaffold-ui/main.tsx:24, packages/agents/skills/quickstart/scaffold-ui/main.tsx:13, packages/agents/skills/quickstart/scaffold-ui/main.tsx:10, …
Declared in packages/agents-desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — packages/agents-desktop/package.json:31, packages/agents-desktop/package.json:38, packages/agents-desktop/package.json:41
Declared in packages/agents-mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — packages/agents-mobile/package.json:53, packages/agents-mobile/package.json:29, packages/agents-mobile/package.json:36, …
Declared in packages/agents-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — packages/agents-server/package.json:47, packages/agents-server/package.json:58, packages/agents-server/package.json:62
Declared in packages/experimental/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/experimental/package.json:20
Declared in packages/react-hooks/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/react-hooks/package.json:26
Declared in packages/typescript-client/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — packages/typescript-client/package.json:28, packages/typescript-client/package.json:37
Every import is type-only — move it to devDependencies. (×3) — packages/agents/src/agents/horton.ts:19, packages/agents-runtime/src/entity-schema.ts:8, packages/agents-server/src/electric-agents/adapter-types.ts:8
Only test files import it (first: packages/electric-ax/test/observe-ui.test.tsx:3) — move it to devDependencies. — packages/electric-ax/package.json:54
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Do you agree with this assessment?
R9 · Circular Imports4.7 / 10Weak✓ Tool-verified
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `nginx.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — packages/sync-service/dev/nginx.conf:20
`server` is set explicitly here. The OWASP Secure Headers Project lists it among the response headers to REMOVE: it names the server, framework or tooling behind the application, which is exactly what an attacker looks up known exploits for. (No deduction on this card.) — packages/agents-desktop/src/state/desktop-state.ts:22
What to do
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Stop sending `server`: delete the write, and suppress the framework's own copy where it has one (Kestrel `AddServerHeader = false`, Express `app.disable('x-powered-by')` / `helmet.hidePoweredBy()`, nginx `server_tokens off`, IIS `<requestFiltering removeServerHeader="true" />`).
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.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader1.6 / 10Critical✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`key_size` is taken from input the program did not write at line 934 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 937 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:937
`json_size` is taken from input the program did not write at line 934 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 938 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:938
`key_size` is taken from input the program did not write at line 88 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 89 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:89
`json_size` is taken from input the program did not write at line 90 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 91 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:91
`key_size` is taken from input the program did not write at line 161 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 162 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:162
`json_size` is taken from input the program did not write at line 163 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 164 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:164
`key_size` is taken from input the program did not write at line 361 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 362 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:362
`json_size` is taken from input the program did not write at line 363 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 364 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present. — packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:364
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.8 / 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.
`canonicalBigintSafeStringify` is exported, takes a document from its caller (line 94) and hands it to `canonicalize`, which calls itself at line 101 (`canonicalize`) with a piece of `value` (and at line 104) — and nowhere in `canonicalize` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/typescript-client/src/helpers.ts:101
`findTile` is exported and takes `node: WorkspaceNode | null` from its caller, and it calls itself at line 143 (`findTile`) with a piece of `node` — and nowhere in `findTile` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findTile` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agents-server-ui/src/lib/workspace/workspaceReducer.ts:143
`listTiles` is exported and takes `node: WorkspaceNode | null` from its caller, and it calls itself at line 152 (`listTiles`) with a piece of `node` — and nowhere in `listTiles` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `listTiles` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agents-server-ui/src/lib/workspace/workspaceReducer.ts:152
`validateSchemaSubset` is exported, takes a document from its caller (line 43) and hands it to `findDisallowedKeywords`, which calls itself at line 78 (`this.findDisallowedKeywords`) with a piece of `obj` (and at line 92, line 100) — and nowhere in `findDisallowedKeywords` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findDisallowedKeywords` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agents-server/src/electric-agents/schema-validator.ts:78
`classifyModelProviderError` is exported, takes a document from its caller (line 46) and hands it to `stringifyError`, which calls itself at line 38 (`stringifyError`) with a piece of `error` — and nowhere in `stringifyError` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `stringifyError` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agents-runtime/src/model-provider-error.ts:38
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 type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
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.
Only 10/39 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`fetchStarCount` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/src/lib/star-count.ts:44
`fetchMarkdownAsset` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/netlify/edge-functions/serve-markdown.ts:61
`pollClaimableSource` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/start/src/electric-api.ts:44
`provisionElectricResources` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/start/src/electric-api.ts:93
`claimResources` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/start/src/electric-api.ts:153
`createEntityStreamDB` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/electric-ax/src/entity-stream-db.ts:30
`waitHealthy` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/durable-streams-rust/bench-latency/run-latency-matrix.mjs:88
`fork` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:246
`appendWithProducerHeaders` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:341
`getSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:582
`deleteSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:593
`addSubscriptionStreams` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:606
`removeSubscriptionStream` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:629
`claimSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:651
`ackSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:672
`releaseSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/stream-client.ts:688
`forwardFetchRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-server/src/utils/server-utils.ts:434
`registerTypes` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:537
`sendDone` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-runtime/src/process-wake.ts:2649
`searchViaBrave` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-runtime/src/tools/brave-search.ts:13
`getAgentsToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-mobile/src/lib/cloudAuth.ts:566
`refreshWhoami` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — packages/agents-mobile/src/lib/cloudAuth.ts:613, packages/agents-desktop/src/cloud/cloud-auth.ts:433
`tokens` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-mcp/src/auth/client-credentials.ts:35
`refreshCodexAuthIfNeeded` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-desktop/src/credentials/codex-auth.ts:259
`signInCodex` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-desktop/src/credentials/codex-auth.ts:507
`fetchAgentsToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-desktop/src/cloud/cloud-agent-servers.ts:275
`desktopServerFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents-desktop/src/cloud/server-fetch.ts:73
`registerPullWakeRunner` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/agents/src/server.ts:426
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
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.
`debug` at line 498 is called with an argument built by `map((c) => c.type)` (line 501), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — packages/agents-runtime/src/pi-adapter.ts:498
`debug` at line 688 is called with an argument built by `JSON.stringify(eventCounts)` (line 691), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — packages/agents-runtime/src/pi-adapter.ts:688
What to do
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
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?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
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.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×21) — packages/typescript-client/src/client.ts:750, packages/typescript-client/src/client.ts:1856, packages/typescript-client/src/client.ts:1922, …
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. (×18) — packages/typescript-client/src/expired-shapes-cache.ts:43, packages/typescript-client/src/fetch.ts:466, packages/typescript-client/src/up-to-date-tracker.ts:124, …
`catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — packages/agents-server-ui/src/hooks/useWorkspacePersistence.ts:102
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`warn` at line 208 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:208
`info` at line 257 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:257
`warn` at line 375 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:375
`warn` at line 452 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:452
`warn` at line 571 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:571
`warn` at line 739 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-bridge-manager.ts:739
`warn` at line 2294 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-manager.ts:2294
`warn` at line 2302 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-manager.ts:2302
`warn` at line 3306 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-manager.ts:3306
`warn` at line 3426 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-manager.ts:3426
`warn` at line 175 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-projector.ts:175
`warn` at line 620 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-projector.ts:620
`warn` at line 641 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-projector.ts:641
`warn` at line 687 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-projector.ts:687
`warn` at line 736 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/entity-projector.ts:736
`warn` at line 384 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/pg-sync-bridge-manager.ts:384
`warn` at line 394 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/pg-sync-bridge-manager.ts:394
`warn` at line 403 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/pg-sync-bridge-manager.ts:403
`warn` at line 502 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/pg-sync-bridge-manager.ts:502
`warn` at line 509 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/pg-sync-bridge-manager.ts:509
`warn` at line 185 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/runtime.ts:185
`warn` at line 465 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/runtime.ts:465
`warn` at line 473 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/runtime.ts:473
`warn` at line 612 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/scheduler.ts:612
`info` at line 214 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:214
`warn` at line 148 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/tag-stream-outbox-drainer.ts:148
`error` at line 164 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/tag-stream-outbox-drainer.ts:164
`warn` at line 167 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/tag-stream-outbox-drainer.ts:167
`error` at line 296 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/wake-registry.ts:296
`error` at line 304 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/wake-registry.ts:304
`warn` at line 117 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/hooks.ts:117
`warn` at line 560 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:560
`info` at line 808 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:808
`info` at line 864 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:864
`warn` at line 868 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:868
`info` at line 882 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:882
`warn` at line 887 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:887
`error` at line 894 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/internal-router.ts:894
`error` at line 116 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-server/src/routing/pg-sync-router.ts:116
`info` at line 930 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/agents-runtime/src/context-factory.ts:930
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.
41/42 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~1.4 `!` null assertions per 1k TypeScript source lines — 189 assertion(s) across the 139307 source line(s) of the 556 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/agents-runtime/src/process-wake.ts (16), packages/y-electric/src/y-electric.ts (12), packages/agents-runtime/scripts/bench-build-sections.ts (9). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 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 — 4 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.
P12 CI test-gate honesty — 17 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 36 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.
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; the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Elixir processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 1 — a container did not start, exited, or never became healthy) — Error response from daemon: driver failed programming external connectivity on endpoint pglite-linearlite-backend-1 (1c580e256cd817c8fa4a05d6c6c5734830fd7b976117fccba3fd04e90e751459): failed to bind port 0.0.0.0:3000/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:3000: bind: address already in use; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
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.
D22 Internal API Consistency — N/A — too few peer members to establish a convention across 2 exposed TypeScript types.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 18 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 38 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 Elixir aggregate(s) emitting domain events (%Event{} from execute/2))
P9 Domain vs controller coverage — coverage data present for 187 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, 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.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Elixir processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — 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.
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.
Flaky test: packages/agents-mcp/test/e2e/everything-http.test.ts::E2E — everything server (HTTP) calls echo via HTTP — Passed 2×, failed 1× across repeated runs.
Flaky test: packages/agents-mcp/test/e2e/everything-http.test.ts::E2E — everything server (HTTP) connects via HTTP and lists tools — Passed 2×, failed 1× across repeated runs.
Flaky test: packages/agents-runtime/test/runtime-dsl.test.ts::N: wake primitives verification N3b: spawn wake and child manifest share one runFinished registration — Passed 2×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Concurrent Operations concurrent spawns under same type succeed — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Concurrent Operations sequential tag updates accumulate — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Auth Boundary GET entity does not leak write_token — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Auth Boundary spawn does not expose a public tag write token — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Auth Boundary tag update without legacy entity write token is authorized by principal permission — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Entity Type Registration register entity type without creation_schema — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Send multiple sends preserve order in stream — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Send send to nonexistent entity returns 404 — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Send send without from uses principal — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Send — State Protocol Format multiple sends produce unique sequential keys — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents Typed Spawn spawn without explicit tags defaults to empty tags — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents findLastUserMessage — State Protocol send event is parseable by webhook handler — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Electric Agents findLastUserMessage — State Protocol stream events after send are all State Protocol format — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Error Paths delete entity type goes through state stream — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Error Paths kill nonexistent entity with registered type returns 404 — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Error Paths send without payload is rejected — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Error Paths tag update on stopped entity is rejected as not running — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Property-Based: Random Action Sequences random action sequences preserve safety invariants — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Type Revision Edge Cases amend schemas on deleted type returns 404 — Passed 1×, failed 1× across repeated runs.
Flaky test: packages/agents-server/test/conformance.test.ts::Electric Agents Entity Runtime Type Revision Edge Cases existing entities accept schemas added across multiple amendments — Passed 1×, failed 1× across repeated runs.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label packages/agents-server-ui/src/components/AttachmentDrafts.tsx:286— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/agents-server-ui/src/components/SearchPalette.tsx:528— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:155— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×3
Click handler on a non-interactive <div> packages/agents-server-ui/src/components/ComposerShell.tsx:109— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/agents-server-ui/src/components/stateExplorer/EventSidebar.tsx:170— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/agents-server-ui/src/components/stateExplorer/StateTable.tsx:202— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge packages/agents-mobile/src/screens/ShareSessionScreen.tsx:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AC4 · Keyboard semantics· Clickable role="separator" that no keyboard user can reach · ×2
Clickable role="separator" that no keyboard user can reach packages/agents-server-ui/src/components/Sidebar.tsx:387— This <div> announces itself as a role="separator" and is operated by mousedown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds).
Clickable role="separator" that no keyboard user can reach packages/agents-server-ui/src/components/workspace/Splitter.tsx:67— This <div> announces itself as a role="separator" and is operated by mousedown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds).
Import cycle (2 files) packages/agents-server/src/entity-manager.ts:38— packages/agents-server/src/entity-manager.ts → packages/agents-server/src/routing/dispatch-policy.ts → packages/agents-server/src/entity-manager.ts (one verified cycle inside a mutually-dependent group of 3 files)
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×1
Click handler on a non-interactive <span> packages/agents-server-ui/src/components/EntityHeader.tsx:199— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Unlisted import '@radix-ui/react-icons' packages/agents/skills/quickstart/scaffold-ui/main.tsx:24— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@radix-ui/themes' packages/agents/skills/quickstart/scaffold-ui/main.tsx:13— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'react-dom' packages/agents/skills/quickstart/scaffold-ui/main.tsx:10— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'streamdown' packages/agents/skills/quickstart/scaffold-ui/main.tsx:25— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
FunctionTooLong: process-wake.processWake packages/agents-runtime/src/process-wake.ts:434— FunctionTooLong — processWake runs 1595 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1495 over it, 15.95× 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: meshOfStreams.createMeshScene website/src/components/brand-toys/meshOfStreams.ts:930— FunctionTooLong — createMeshScene runs 798 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 698 over it, 7.98× 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: setup-context.createSetupContext packages/agents-runtime/src/setup-context.ts:229— FunctionTooLong — createSetupContext runs 748 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 648 over it, 7.48× 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: EntityTimeline.EntityTimeline packages/agents-server-ui/src/components/EntityTimeline.tsx:1378— FunctionTooLong — EntityTimeline runs 635 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 535 over it, 6.35× 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: context-factory.createHandlerContext packages/agents-runtime/src/context-factory.ts:513— FunctionTooLong — createHandlerContext runs 597 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 497 over it, 5.97× 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: runtime-server-client.createRuntimeServerClient packages/agents-runtime/src/runtime-server-client.ts:261— FunctionTooLong — createRuntimeServerClient runs 532 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 432 over it, 5.32× 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: entity-stream-db.createEntityStreamDB packages/agents-runtime/src/entity-stream-db.ts:167— FunctionTooLong — createEntityStreamDB runs 468 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 368 over it, 4.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MessageInput.MessageInput packages/agents-server-ui/src/components/MessageInput.tsx:53— FunctionTooLong — MessageInput runs 443 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 343 over it, 4.43× 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: pull-wake-runner.createPullWakeRunner packages/agents-runtime/src/pull-wake-runner.ts:101— FunctionTooLong — createPullWakeRunner runs 413 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 313 over it, 4.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: controller.createDesktopMainController packages/agents-desktop/src/app/controller.ts:62— FunctionTooLong — createDesktopMainController runs 409 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 309 over it, 4.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: pi-adapter.createPiAgentAdapter packages/agents-runtime/src/pi-adapter.ts:266— FunctionTooLong — createPiAgentAdapter runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: pi-adapter.createPiAgentAdapter.<returned closure> packages/agents-runtime/src/pi-adapter.ts:269— FunctionTooLong — createPiAgentAdapter.<returned closure> runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SearchPalette.SearchPalette packages/agents-server-ui/src/components/SearchPalette.tsx:126— FunctionTooLong — SearchPalette runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ApiKeysForm.ApiKeysForm packages/agents-server-ui/src/components/ApiKeysForm.tsx:72— FunctionTooLong — ApiKeysForm runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.65× 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: ShareSessionScreen.ShareSessionScreen packages/agents-mobile/src/screens/ShareSessionScreen.tsx:106— FunctionTooLong — ShareSessionScreen runs 363 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× 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: ShareEntityDialog.ShareEntityDialog packages/agents-server-ui/src/components/ShareEntityDialog.tsx:102— FunctionTooLong — ShareEntityDialog runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× 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: LocalRuntimePage.LocalRuntimePage packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:151— FunctionTooLong — LocalRuntimePage runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SessionScreen.NativeMessageComposer packages/agents-mobile/src/screens/SessionScreen.tsx:495— FunctionTooLong — NativeMessageComposer runs 336 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 236 over it, 3.36× 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: SessionMenu.SessionMenu packages/agents-mobile/src/components/SessionMenu.tsx:122— FunctionTooLong — SessionMenu runs 330 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 230 over it, 3.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SplitMenu.SplitMenu packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:153— FunctionTooLong — SplitMenu runs 303 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 203 over it, 3.03× 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: ComposerEditor.ComposerEditorEvents REDACTED:438— FunctionTooLong — ComposerEditorEvents runs 302 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× 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: McpServerFormDialog.McpServerFormDialog packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:268— FunctionTooLong — McpServerFormDialog runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SidebarViewMenu.SidebarViewMenu packages/agents-server-ui/src/components/SidebarViewMenu.tsx:70— FunctionTooLong — SidebarViewMenu runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.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.
FunctionTooLong: NewSessionView.NewSessionView packages/agents-server-ui/src/components/views/NewSessionView.tsx:153— FunctionTooLong — NewSessionView runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× 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: registry.createRegistry packages/agents-mcp/src/registry.ts:163— FunctionTooLong — createRegistry runs 281 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 181 over it, 2.81× 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.
+ 86 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×98
FileTooLong: src/entity-manager.ts packages/agents-server/src/entity-manager.ts— FileTooLong — 2836 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: EntityManager (372-4105). The bar is 500 significant lines; this is 2336 over it, 5.67× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/process-wake.ts packages/agents-runtime/src/process-wake.ts— FileTooLong — 1941 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: processWake (434-2647). The bar is 500 significant lines; this is 1441 over it, 3.88× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/entity-registry.ts packages/agents-server/src/entity-registry.ts— FileTooLong — 1721 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: PostgresRegistry (199-2186). The bar is 500 significant lines; this is 1221 over it, 3.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/EntityTimeline.tsx packages/agents-server-ui/src/components/EntityTimeline.tsx— FileTooLong — 1708 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1208 over it, 3.42× 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: screens/SessionScreen.tsx packages/agents-mobile/src/screens/SessionScreen.tsx— FileTooLong — 1496 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 996 over it, 2.99× 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: brand-toys/meshOfStreams.ts website/src/components/brand-toys/meshOfStreams.ts— FileTooLong — 1449 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 949 over it, 2.90× 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: iso/render.ts website/src/components/home/iso/render.ts— FileTooLong — 1438 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 938 over it, 2.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/entity-timeline.ts packages/agents-runtime/src/entity-timeline.ts— FileTooLong — 1432 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 932 over it, 2.86× 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: eval/parser.ex packages/sync-service/lib/electric/replication/eval/parser.ex— FileTooLong — 1394 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 67 functions. The bar is 500 significant lines; this is 894 over it, 2.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/client.ts packages/typescript-client/src/client.ts— FileTooLong — 1369 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: ShapeStream (649-2417). The bar is 500 significant lines; this is 869 over it, 2.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: views/NewSessionView.tsx packages/agents-server-ui/src/components/views/NewSessionView.tsx— FileTooLong — 1239 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 739 over it, 2.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/handlers.rs packages/durable-streams-rust/src/handlers.rs— FileTooLong — 1228 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 50 free functions. The bar is 500 significant lines; this is 728 over it, 2.46× 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: REDACTED REDACTED— FileTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 658 over it, 2.32× 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: components/OnboardingModal.tsx packages/agents-server-ui/src/components/OnboardingModal.tsx— FileTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 606 over it, 2.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: src/entity-schema.ts packages/agents-runtime/src/entity-schema.ts— FileTooLong — 1012 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 512 over it, 2.02× 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: connection/manager.ex packages/sync-service/lib/electric/connection/manager.ex— FileTooLong — 1006 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 58 functions. The bar is 500 significant lines; this is 506 over it, 2.01× 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: shape_cache/pure_file_storage.ex packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex— FileTooLong — 1006 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 103 functions. The bar is 500 significant lines; this is 506 over it, 2.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/context-factory.ts packages/agents-runtime/src/context-factory.ts— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: createHandlerContext (513-1369). The bar is 500 significant lines; this is 485 over it, 1.97× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: shapes/shape.ex packages/sync-service/lib/electric/shapes/shape.ex— FileTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 55 functions. The bar is 500 significant lines; this is 454 over it, 1.91× 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: shapes/consumer.ex packages/sync-service/lib/electric/shapes/consumer.ex— FileTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 420 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/setup-context.ts packages/agents-runtime/src/setup-context.ts— FileTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: createSetupContext (229-1328). The bar is 500 significant lines; this is 414 over it, 1.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: shapes/api.ex packages/sync-service/lib/electric/shapes/api.ex— FileTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 62 functions. The bar is 500 significant lines; this is 389 over it, 1.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/store.rs packages/durable-streams-rust/src/store.rs— FileTooLong — 869 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 369 over it, 1.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/types.ts packages/agents-runtime/src/types.ts— FileTooLong — 846 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 346 over it, 1.69× 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: REDACTED REDACTED— FileTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 319 over it, 1.64× 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.
+ 32 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file packages/agents-server-ui/src/components/EntityTimeline.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-mobile/src/screens/SessionScreen.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/views/NewSessionView.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/OnboardingModal.tsx: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 REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/AgentResponse.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/EntityContextDrawer.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-mobile/src/screens/ShareSessionScreen.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/ShareEntityDialog.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-mobile/src/screens/NewSessionScreen.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/lib/server-connection.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 packages/agents-mobile/src/screens/OnboardingScreen.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-mobile/src/components/HomeMenu.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-desktop/src/credentials/codex-auth.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 packages/agents-server-ui/src/lib/sendMessage.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 packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-desktop/src/app/controller.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 packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/SearchPalette.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/router.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/MessageInput.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx: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.
Swallowed exception (empty catch) packages/typescript-client/src/client.ts:750— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/client.ts:1856— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/client.ts:1922— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/client.ts:2085— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/client.ts:2166— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/expired-shapes-cache.ts:43— 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) packages/typescript-client/src/fetch.ts:429— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/fetch.ts:464— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/typescript-client/src/fetch.ts:466— 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) packages/typescript-client/src/up-to-date-tracker.ts: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) REDACTED:91— 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) packages/durable-streams-rust/bench-latency/latency-probe.mjs:116— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/durable-streams-rust/bench-latency/run-latency-matrix.mjs:96— 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) packages/agents-server-ui/src/router.tsx:235— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/agents-server-ui/src/router.tsx:256— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/agents-server-ui/src/router.tsx:258— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/agents-server-ui/src/lib/entity-connection.ts:85— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/agents-server-ui/src/lib/entity-connection.ts:108— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/agents-server-ui/src/lib/entity-connection.ts:206— 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) packages/agents-server-ui/src/lib/schemaProperties.ts:68— 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) packages/agents-server-ui/src/lib/timelineRowHeights.ts:82— 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) packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:441— 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) packages/agents-server-ui/src/lib/workspace/dragPayload.ts:167— 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) packages/agents-server-ui/src/hooks/useExpandedTreeNodes.ts:111— 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) packages/agents-server-ui/src/hooks/useForkFromHere.ts:58— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
TodoComment packages/y-electric/src/y-electric.ts:254— // TODO: await for events before closing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/typescript-client/test/integration.test.ts:93— // TODO: this test fails in SSE mode because we don't use the provided fetchWrapper — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/test/support/pg_expression_generator.ex:203— # TODO: comparisons don't work on nullable booleans — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/test/electric/replication/eval/parser_test.exs:697— # TODO: Does not support arbitrary bounds input syntax yet, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/test/electric/plug/router_test.exs:1886— # TODO: fix issue with shape crashing before it is initialised — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/config.ex:153— # TODO: fix defaults to synchronous=NORMAL and shape_db_cache_size=2048 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/api.ex:402— # TODO: discuss returning a 307 redirect rather than a 409, the client — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/api.ex:1273— # TODO: we currently only convert DBConnection errors to proper 503s, we should — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/consumer.ex:317— # TODO: Remove. Only needed for InMemoryStorage — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/consumer.ex:1048— # TODO: This is a very naive way to handle truncations: if ANY relevant truncates are — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/partitions.ex:123— # TODO: we should probabaly have a way to clean the inspector cache — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shapes/consumer/materializer.ex:582— # TODO: this is written as if it supports multiple selected columns, but it doesn't for now — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:188— # TODO: remove once we're sure that no install has un-nested storage — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/replication/eval/known_definition.ex:251— # TODO: doesn't support default or optional arguments — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/postgres/replication_client.ex:106— # TODO: stream out transactions and collect on disk to avoid this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/postgres/replication_client.ex:208— # TODO(alco): this needs additional info about :noreply and :query return tuples. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/postgres/logical_replication/decoder.ex:110— # TODO: Handle case where pg_catalog is blank, we should still return the schema as pg_catalog — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/plug/serve_shape_plug.ex:240— # TODO: remove experimental_live_sse after proper deprecation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/plug/serve_shape_plug.ex:354— # TODO: Make adaptive based on actual metrics (P95 latency, queue depth, etc.) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/lib/electric/plug/utils.ex:48— # TODO: convert output to MapSet? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sync-service/config/runtime.exs:51— # TODO: Remove this in a minor version bump — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/experimental/src/multi-shape-stream.ts:249— // TODO: we probably want to disconnect all shapes here on the first error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/elixir-client/lib/electric/client/ecto_adapter/postgres.ex:102— # TODO: our expression parser fails when you qualify column names with the table name — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/agents-server-conformance-tests/src/electric-agents-tests.ts:428— // TODO(durable-scheduler): restore once delete status semantics are reconciled. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1329— // TODO(durable-scheduler): restore once schema amendment propagation is fixed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
No assertions: should infer generic row return type when no type is provided packages/typescript-client/test/client.test-d.ts:28— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should infer correct return type when provided packages/typescript-client/test/client.test-d.ts:42— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should allow valid params packages/typescript-client/test/client.test-d.ts:64— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should not allow reserved params packages/typescript-client/test/client.test-d.ts:81— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should infer generic row return type when no type is provided packages/typescript-client/test/client.test-d.ts:100— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should infer correct return type when provided packages/typescript-client/test/client.test-d.ts:120— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should respect ChangeMessages type guard packages/typescript-client/test/helpers.test-d.ts:11— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should respect ControlMessages type guard packages/typescript-client/test/helpers.test-d.ts:30— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: transitions InitialState → SyncingState on valid response packages/typescript-client/test/shape-stream-state.test.ts:48— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: transitions SyncingState → LiveState on up-to-date message packages/typescript-client/test/shape-stream-state.test.ts:114— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: LiveState stays LiveState on subsequent up-to-date packages/typescript-client/test/shape-stream-state.test.ts:125— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: LiveState.isUpToDate returns true packages/typescript-client/test/shape-stream-state.test.ts:136— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: InitialState and SyncingState.isUpToDate return false packages/typescript-client/test/shape-stream-state.test.ts:141— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: PausedState.resume returns previous state packages/typescript-client/test/shape-stream-state.test.ts:346— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: PausedState.isUpToDate delegates to previous state packages/typescript-client/test/shape-stream-state.test.ts:358— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: ErrorState.retry returns previous state packages/typescript-client/test/shape-stream-state.test.ts:377— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: ErrorState.isUpToDate delegates to previousState packages/typescript-client/test/shape-stream-state.test.ts:670— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: happy-path-live: Initial → Syncing → Live packages/typescript-client/test/shape-stream-state.test.ts:979— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: pause-resume: preserves handle and offset packages/typescript-client/test/shape-stream-state.test.ts:989— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: markMustRefetch: resets to Initial with offset -1 packages/typescript-client/test/shape-stream-state.test.ts:1018— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: standard scenario runs cleanly packages/typescript-client/test/shape-stream-state.test.ts:1376— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should start requesting only after first subscription packages/typescript-client/test/stream.test.ts:631— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should infer correct return type when no selector is provided packages/react-hooks/test/react-hooks.test-d.ts:6— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should infer correct return type when a selector is provided packages/react-hooks/test/react-hooks.test-d.ts:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should raise a type error if type argument does not equal inferred return type packages/react-hooks/test/react-hooks.test-d.ts:43— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
+ 4 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×29
Async function without AbortSignal: fetchStarCount website/src/lib/star-count.ts:44— `fetchStarCount` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchMarkdownAsset website/netlify/edge-functions/serve-markdown.ts:61— `fetchMarkdownAsset` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: pollClaimableSource packages/start/src/electric-api.ts:44— `pollClaimableSource` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: provisionElectricResources packages/start/src/electric-api.ts:93— `provisionElectricResources` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: claimResources packages/start/src/electric-api.ts:153— `claimResources` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: createEntityStreamDB packages/electric-ax/src/entity-stream-db.ts:30— `createEntityStreamDB` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: waitHealthy packages/durable-streams-rust/bench-latency/run-latency-matrix.mjs:88— `waitHealthy` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fork packages/agents-server/src/stream-client.ts:246— `fork` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: appendWithProducerHeaders packages/agents-server/src/stream-client.ts:341— `appendWithProducerHeaders` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getSubscription packages/agents-server/src/stream-client.ts:582— `getSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: deleteSubscription packages/agents-server/src/stream-client.ts:593— `deleteSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: addSubscriptionStreams packages/agents-server/src/stream-client.ts:606— `addSubscriptionStreams` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: removeSubscriptionStream packages/agents-server/src/stream-client.ts:629— `removeSubscriptionStream` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: claimSubscription packages/agents-server/src/stream-client.ts:651— `claimSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: ackSubscription packages/agents-server/src/stream-client.ts:672— `ackSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: releaseSubscription packages/agents-server/src/stream-client.ts:688— `releaseSubscription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: forwardFetchRequest packages/agents-server/src/utils/server-utils.ts:434— `forwardFetchRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: registerTypes REDACTED:537— `registerTypes` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: sendDone packages/agents-runtime/src/process-wake.ts:2649— `sendDone` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: searchViaBrave packages/agents-runtime/src/tools/brave-search.ts:13— `searchViaBrave` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getAgentsToken packages/agents-mobile/src/lib/cloudAuth.ts:566— `getAgentsToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshWhoami packages/agents-mobile/src/lib/cloudAuth.ts:613— `refreshWhoami` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: tokens packages/agents-mcp/src/auth/client-credentials.ts:35— `tokens` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshCodexAuthIfNeeded packages/agents-desktop/src/credentials/codex-auth.ts:259— `refreshCodexAuthIfNeeded` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: signInCodex packages/agents-desktop/src/credentials/codex-auth.ts:507— `signInCodex` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
+ 4 more in this group — see findings.md.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×20
Focus outline removed in CSS without a :focus replacement website/src/components/pricing/PricingCalculator.vue:379— `.input-slider` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Combobox.module.css:41— `.input` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Combobox.module.css:50— `.list` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Combobox.module.css:79— `.item` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Dialog.module.css:37— `.popup` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Menu.module.css:36— `.item` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Popover.module.css:39— `.popup` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/ScrollArea.module.css:11— `.viewport` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Select.module.css:149— `.item` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/ui/Tooltip.module.css:15— `.popup` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/MessageInput.module.css:222— `.proseMirrorEditor` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/MessageInput.module.css:382— `.slashArgumentValue` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/NewSessionPage.module.css:435— `.modelSettingsSubmenuTrigger` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/SearchPalette.module.css:29— `.popup` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/SettingsMenu.module.css:27— `.submenuTrigger` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/SidebarViewMenu.module.css:22— `.submenuTrigger` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/workspace/PaneFindBar.module.css:31— `.input` 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.
Focus outline removed in CSS without a :focus replacement packages/agents-server-ui/src/components/workspace/SplitMenu.module.css:31— `.submenuTrigger` 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.
Focus outline removed in CSS without a :focus replacement examples/write-patterns/shared/app/style.css:94— `.example form input[type='text']` 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.
Focus outline removed in CSS without a :focus replacement examples/encryption/src/Example.css:57— `form input[type='text']` 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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×20
Animation without a prefers-reduced-motion guard website/src/components/AngelsGrid.vue:51— `.ag-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/BlogPostHeader.vue:48— `.post-back-arrow` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/ContactCards.vue:82— `.cc-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/LocalNavOutlineDropdown.vue:200— `.icon` moves (`transition: transform 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/LogoDownloads.vue:59— `.ld-tile` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/SocialLinks.vue:71— `.sl-chip` moves (`transition: border-color 0.2s ease,
color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/TeamMembers.vue:67— `.tm-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/VCsGrid.vue:51— `.vc-card` moves (`transition: border-color 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/sync-home/MultiClientPulseDemo.vue:443— `.mcp-source.pulse::after` moves (`animation: mcp-source-flash 0.7s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/sync-home/MultiClientPulseDemo.vue:602— `.mcp-demo.started .client-row` moves (`animation: mcp-row-in 0.4s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/sync-home/QueryLensDemo.vue:348— `.qld-nav-dot` moves (`transition: background 200ms ease,
transform 200ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/sync-home/ShapeCarveDemo.vue:469— `.shape-carve.started .sc-row.matched` moves (`animation: sc-carve-in 0.5s ease-out backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/sync-home/ShapeCarveDemo.vue:593— `.shape-carve.started .sc-client-row` moves (`animation: sc-client-in 0.45s ease-out backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/AgentLoopFillDemo.vue:336— `.alf-blades` moves (`transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/AgentLoopFillDemo.vue:408— `.alf-event` moves (`transition: opacity 0.45s ease,
transform 0.45s ease,
border-color 0.45s ease,
background 0.45s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/AgentLoopFillDemo.vue:444— `.alf-event-rule` moves (`animation: alf-rule-grow 1.1s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/AgentLoopFillDemo.vue:470— `.alf-event-enter-active` moves (`transition: opacity 0.4s ease,
transform 0.4s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/AgentLoopFillDemo.vue:485— `.alf-event-move` moves (`transition: transform 0.45s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/IntegrationsGrid.vue:95— `.ig-card` moves (`transition: border-color 0.2s,
transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard website/src/components/streams-home/LayersGrid.vue:123— `.lg-card` moves (`transition: border-color 0.2s,
transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
P12 · CI test-gate honesty· Workspace package's tests never run by CI · ×16
Workspace package's tests never run by CI examples/.shared/package.json:1— `examples/.shared` is a workspace package with 1 test(s) in 1 file(s) (e.g. `examples/.shared/e2e/e2e.test.tsx`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI examples/agents-walkthrough/package.json:11— `examples/agents-walkthrough` is a workspace package with 1 test(s) in 1 file(s) (e.g. `examples/agents-walkthrough/test/smoke.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI examples/phoenix-liveview/package.json:1— `examples/phoenix-liveview` is a workspace package with 1 test(s) in 1 file(s) (e.g. `examples/phoenix-liveview/e2e/e2e.test.tsx`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI examples/tanstack/package.json:1— `examples/tanstack` is a workspace package with 1 test(s) in 1 file(s) (e.g. `examples/tanstack/e2e/e2e.test.tsx`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/agents-mcp/package.json:34— `packages/agents-mcp` is a workspace package with 89 test(s) in 21 file(s) (e.g. `packages/agents-mcp/test/env-expand.test.ts`, `packages/agents-mcp/test/loader.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/agents-mobile/package.json:12— `packages/agents-mobile` is a workspace package with 88 test(s) in 10 file(s) (e.g. `packages/agents-mobile/src/lib/agentsClient.test.ts`, `packages/agents-mobile/src/lib/availableServers.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/agents-runtime/package.json:20— `packages/agents-runtime` is a workspace package with 915 test(s) in 80 file(s) (e.g. `packages/agents-runtime/test/bash-tool.test.ts`, `packages/agents-runtime/test/brave-search-tool.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/agents-server/package.json:41— `packages/agents-server` is a workspace package with 422 test(s) in 53 file(s) (e.g. `packages/agents-server/test/claim-write-token-store.test.ts`, `packages/agents-server/test/conformance.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/agents/package.json:25— `packages/agents` is a workspace package with 96 test(s) in 16 file(s) (e.g. `packages/agents/test/bootstrap-mcp.test.ts`, `packages/agents/test/builtin-pull-wake-registration.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/electric-ax/package.json:43— `packages/electric-ax` is a workspace package with 105 test(s) in 9 file(s) (e.g. `packages/electric-ax/test/cli.test.ts`, `packages/electric-ax/test/completions.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/experimental/package.json:70— `packages/experimental` is a workspace package with 18 test(s) in 3 file(s) (e.g. `packages/experimental/test/bigint-utils.test.ts`, `packages/experimental/test/match.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/react-hooks/package.json:76— `packages/react-hooks` is a workspace package with 10 test(s) in 1 file(s) (e.g. `packages/react-hooks/test/react-hooks.test.tsx`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/start/package.json:25— `packages/start` is a workspace package with 54 test(s) in 5 file(s) (e.g. `packages/start/test/cli.test.ts`, `packages/start/test/electric-api.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/typescript-client/package.json:117— `packages/typescript-client` is a workspace package with 488 test(s) in 20 file(s) (e.g. `packages/typescript-client/test/204-no-content.test.ts`, `packages/typescript-client/test/cache.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/y-electric/package.json:36— `packages/y-electric` is a workspace package with 6 test(s) in 1 file(s) (e.g. `packages/y-electric/test/y-electric.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI website/package.json:8— `website` is a workspace package with 16 test(s) in 2 file(s) (e.g. `website/tests/unit/meta-image.test.ts`, `website/tests/unit/social-bot-detection.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
durable_streams::handlers::handle_append_inner (cognitive 89) packages/durable-streams-rust/src/handlers.rs:919— durable_streams::handlers::handle_append_inner has cognitive complexity 89 (threshold 15). Drivers by points: if/else 39 (68 pts), match/switch 8 (16 pts), boolean chains 5 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
durable_streams::handlers::handle_create (cognitive 84) packages/durable-streams-rust/src/handlers.rs:367— durable_streams::handlers::handle_create has cognitive complexity 84 (threshold 15). Drivers by points: if/else 20 (44 pts), match/switch 16 (30 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
durable_streams::main (cognitive 51) packages/durable-streams-rust/src/main.rs:113— durable_streams::main has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 9 (23 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
durable_streams::engine_raw::conn_loop (cognitive 36) packages/durable-streams-rust/src/engine_raw.rs:165— durable_streams::engine_raw::conn_loop has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 4 (12 pts), boolean chains 1, loops 1 (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.
durable_streams::http1::decode_chunked (cognitive 35) packages/durable-streams-rust/src/http1.rs:239— durable_streams::http1::decode_chunked has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (8 pts), match/switch 2 (4 pts), boolean chains 2 (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.
durable_streams::handlers::stream_resolved_body (cognitive 27) packages/durable-streams-rust/src/handlers.rs:1386— durable_streams::handlers::stream_resolved_body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
durable_streams::handlers::parse_rfc3339 (cognitive 25) packages/durable-streams-rust/src/handlers.rs:295— durable_streams::handlers::parse_rfc3339 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, loops 1 (2 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
durable_streams::wal_dir_has_segments (cognitive 22) packages/durable-streams-rust/src/main.rs:51— durable_streams::wal_dir_has_segments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 11). Of this number, 20 points are the body's own statements and 2 belong 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.
durable_streams::spawn_checkpoint_ticker (cognitive 22) packages/durable-streams-rust/src/main.rs:490— durable_streams::spawn_checkpoint_ticker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
durable_streams::http1::try_parse_head (cognitive 22) packages/durable-streams-rust/src/http1.rs:31— durable_streams::http1::try_parse_head has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (7 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.
durable_streams::handlers::handle_long_poll (cognitive 19) packages/durable-streams-rust/src/handlers.rs:1676— durable_streams::handlers::handle_long_poll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 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.
durable_streams::tier::last_json_value_boundary (cognitive 18) packages/durable-streams-rust/src/tier.rs:118— durable_streams::tier::last_json_value_boundary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 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.
durable_streams::wal::recovery::recover_shard (cognitive 18) packages/durable-streams-rust/src/wal/recovery.rs:124— durable_streams::wal::recovery::recover_shard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sync-over-async blocking packages/agents-runtime/src/skills/registry.ts:145— `fsSync.mkdirSync` in `saveCache` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/electric-ax/src/init.ts:11— `fs.existsSync` in `initProject` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/electric-ax/src/init.ts:20— `execSync` in `initProject` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/start/src/cli.ts:236— `execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/start/src/cli.ts:254— `execSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:34— `execSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:60— `writeFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:67— `existsSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:68— `readFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:73— `writeFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:79— `existsSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:80— `readFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:95— `writeFileSync` in `setupTemplate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
TooManyFunctions: Config packages/sync-service/lib/electric/config.ex:34— TooManyFunctions — 43 functions. The bar is 30 functions; this is 13 over it, 1.43× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: InMemoryStorage packages/sync-service/lib/electric/shape_cache/in_memory_storage.ex:1— TooManyFunctions — 42 functions. The bar is 30 functions; this is 12 over it, 1.40× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: ShapeStatus packages/sync-service/lib/electric/shape_cache/shape_status.ex:1— TooManyFunctions — 40 functions. The bar is 30 functions; this is 10 over it, 1.33× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Connection packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/connection.ex:1— TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: StatusMonitor packages/sync-service/lib/electric/status_monitor.ex:1— TooManyFunctions — 37 functions. The bar is 30 functions; this is 7 over it, 1.23× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: SubqueryIndex packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:1— TooManyFunctions — 36 functions. The bar is 30 functions; this is 6 over it, 1.20× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: RelationTracker packages/sync-service/lib/electric/replication/publication_manager/relation_tracker.ex:1— TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Querying packages/sync-service/lib/electric/shapes/querying.ex:1— TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Utils packages/sync-service/lib/electric/utils.ex:1— TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: WriteBuffer packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/write_buffer.ex:1— TooManyFunctions — 32 functions. The bar is 30 functions; this is 2 over it, 1.07× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Response packages/sync-service/lib/electric/shapes/api/response.ex:1— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1891— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1891 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1907— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1907 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1922— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1922 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1942— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1942 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1966— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1966 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1990— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1990 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1996— packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1996 reaches past another workspace package's public entry into its internals with a relative path (../../agents-runtime/src/tools) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server/test/horton-pull-wake-e2e.test.ts:4— packages/agents-server/test/horton-pull-wake-e2e.test.ts:4 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server/test/horton-spawn-worker.test.ts:3— packages/agents-server/test/horton-spawn-worker.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/agents-server/test/horton-title-generation.test.ts:3— packages/agents-server/test/horton-title-generation.test.ts:3 reaches past another workspace package's public entry into its internals with a relative path (../../agents/src/server) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:relative-cross-package] packages/durable-streams-rust/bench-latency/latency-probe.mjs:16— packages/durable-streams-rust/bench-latency/latency-probe.mjs:16 reaches into another package with a relative path (../../agents-server-conformance-tests/node_modules/@durable-streams/client/dist/index.js) — import the package by name instead.
AC2 · Forms & labels· <TextInput> field component without a label · ×10
<TextInput> field component without a label packages/agents-mobile/src/components/SchemaArgsControls.tsx:340— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/components/SchemaArgsControls.tsx:377— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/components/SchemaArgsControls.tsx:418— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/components/SearchBar.tsx:55— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/NewSessionScreen.tsx:331— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/NewSessionScreen.tsx:472— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/OnboardingScreen.tsx:374— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/ServerSetupScreen.tsx:197— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/SessionScreen.tsx:864— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextInput> field component without a label packages/agents-mobile/src/screens/ShareSessionScreen.tsx:459— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×10
ClassTooLong: EntityManager packages/agents-server/src/entity-manager.ts:372— ClassTooLong — 2566 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 400 significant lines; this is 2166 over it, 6.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PostgresRegistry packages/agents-server/src/entity-registry.ts:199— ClassTooLong — 1561 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 1161 over it, 3.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ShapeStream packages/typescript-client/src/client.ts:649— ClassTooLong — 1035 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 635 over it, 2.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EntityTimeline packages/agents-server-ui/src/components/EntityTimeline.tsx:1— ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 235 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MessageInput packages/agents-server-ui/src/components/MessageInput.tsx:1— ClassTooLong — 443 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 43 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Store packages/durable-streams-rust/src/store.rs:476— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 21 methods, 3 blocks, lines 476-1534. The bar is 400 significant lines; this is 42 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Scheduler packages/agents-server/src/scheduler.ts:265— ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 34 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StreamClient packages/agents-server/src/stream-client.ts:176— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 29 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×8
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:937— `key_size` is taken from input the program did not write at line 934 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 937 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:938— `json_size` is taken from input the program did not write at line 934 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 938 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:89— `key_size` is taken from input the program did not write at line 88 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 89 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:91— `json_size` is taken from input the program did not write at line 90 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 91 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:162— `key_size` is taken from input the program did not write at line 161 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 162 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:164— `json_size` is taken from input the program did not write at line 163 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 164 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:362— `key_size` is taken from input the program did not write at line 361 (`key_size::32-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 362 — and nowhere in its function clause is `key_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `key_size` before spending it — a guard such as `when key_size <= @max`, or a match that takes `binary-size(key_size)` from the bytes actually present.
Length read from the parsed input is spent without ever being bounded packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:364— `json_size` is taken from input the program did not write at line 363 (`json_size::64-bit integer matched out of a binary`), then used as the byte count of an `IO.binread`, which buffers that many bytes at line 364 — and nowhere in its function clause is `json_size` bounded from above — compared to a limit in a guard or a condition, clamped with `min`, or checked against the bytes that remain (a zero test bounds nothing). Whoever wrote that input therefore chooses the size directly: a 32-bit length asks for up to 4 GiB (a 64-bit one for more than any machine has) before a single byte of the payload is known to exist, and on the BEAM an allocation the emulator cannot satisfy is not an exception: the node dies with `eheap_alloc: Cannot allocate … bytes of memory`, taking every other process with it, and no `rescue`, `catch` or supervisor sees it. Bound `json_size` before spending it — a guard such as `when json_size <= @max`, or a match that takes `binary-size(json_size)` from the bytes actually present.
durable_streams::handlers::handle_append_inner (cyclomatic 53) packages/durable-streams-rust/src/handlers.rs:919— durable_streams::handlers::handle_append_inner 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.
durable_streams::handlers::handle_create (cyclomatic 50) packages/durable-streams-rust/src/handlers.rs:367— durable_streams::handlers::handle_create 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.
durable_streams::main (cyclomatic 49) packages/durable-streams-rust/src/main.rs:113— durable_streams::main has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
durable_streams::handlers::parse_rfc3339 (cyclomatic 25) packages/durable-streams-rust/src/handlers.rs:295— durable_streams::handlers::parse_rfc3339 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.
durable_streams::http1::try_parse_head (cyclomatic 18) packages/durable-streams-rust/src/http1.rs:31— durable_streams::http1::try_parse_head 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.
durable_streams::engine_raw::conn_loop (cyclomatic 17) packages/durable-streams-rust/src/engine_raw.rs:165— durable_streams::engine_raw::conn_loop 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.
durable_streams::http1::decode_chunked (cyclomatic 16) packages/durable-streams-rust/src/http1.rs:239— durable_streams::http1::decode_chunked 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.
FixmeComment packages/typescript-client/test/cache.test.ts:9— // FIXME: pull from environment? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment packages/typescript-client/test/client.test.ts:160— // FIXME: might get notified before all changes are submitted — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment packages/sync-service/lib/electric/telemetry/open_telemetry/resource_detector.ex:5— # FIXME(alco): either avoid calling this in Cloud or check whether there is already installation_id set for the resource — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment packages/sync-service/lib/electric/shapes/dependency_layers.ex:34— # FIXME: this assumes children are removed before parents, not sure how true this is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment REDACTED:44— // FIXME The Redis docs suggest only sending 10k commands at a time — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TooManyMethods: EntityManager packages/agents-server/src/entity-manager.ts:372— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× 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: PostgresRegistry packages/agents-server/src/entity-registry.ts:199— TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× 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: WakeRegistry packages/agents-server/src/wake-registry.ts:108— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: ShapeStream packages/typescript-client/src/client.ts:649— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: StreamClient packages/agents-server/src/stream-client.ts:176— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: EntityManager.forkSubtreeInner packages/agents-server/src/entity-manager.ts:962— MethodTooLong — forkSubtreeInner runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EntityManager.spawnInner packages/agents-server/src/entity-manager.ts:636— MethodTooLong — spawnInner runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuiltinAgentsServer.start packages/agents/src/server.ts:184— MethodTooLong — start runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Store.recover_one_inner packages/durable-streams-rust/src/store.rs:772— MethodTooLong — recover_one_inner runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CloudAuth.signIn packages/agents-desktop/src/cloud/cloud-auth.ts:276— MethodTooLong — signIn runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) packages/durable-streams-rust/src/blobstore.rs:229— packages/durable-streams-rust/src/blobstore.rs:229-238 | packages/durable-streams-rust/src/blobstore.rs:240-249 — 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) packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:257— packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:257-266 | packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:274-283 — 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) packages/sync-service/lib/electric/shape_cache.ex:427— packages/sync-service/lib/electric/shape_cache.ex:427-437 | packages/sync-service/lib/electric/utils.ex:83-92 — 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) packages/sync-service/lib/electric/replication/eval/known_definition.ex:222— packages/sync-service/lib/electric/replication/eval/known_definition.ex:222-231 | packages/sync-service/lib/electric/replication/eval/known_definition.ex:235-244 — 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) examples/phoenix-liveview/lib/electric_phoenix_example_web/live/todo_live/form_component.ex:51— examples/phoenix-liveview/lib/electric_phoenix_example_web/live/todo_live/form_component.ex:51-60 | examples/phoenix-liveview/lib/electric_phoenix_example_web/live/todo_live/form_component.ex:64-76 — 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.
Fake-async — async method never awaits packages/agents-desktop/src/cloud/cloud-agent-servers.ts:315— `stop` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/agents-server/src/wake-registry.ts:278— `stopSync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/agents-server/src/wake-registry.ts:727— `applyShapeMessage` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/electric-ax/src/init.ts:7— `initProject` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits REDACTED:24— `setupTemplate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×5
Recursive walk over a caller-supplied document has no depth cap packages/typescript-client/src/helpers.ts:101— `canonicalBigintSafeStringify` is exported, takes a document from its caller (line 94) and hands it to `canonicalize`, which calls itself at line 101 (`canonicalize`) with a piece of `value` (and at line 104) — and nowhere in `canonicalize` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalize` 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 packages/agents-server-ui/src/lib/workspace/workspaceReducer.ts:143— `findTile` is exported and takes `node: WorkspaceNode | null` from its caller, and it calls itself at line 143 (`findTile`) with a piece of `node` — and nowhere in `findTile` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findTile` 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 packages/agents-server-ui/src/lib/workspace/workspaceReducer.ts:152— `listTiles` is exported and takes `node: WorkspaceNode | null` from its caller, and it calls itself at line 152 (`listTiles`) with a piece of `node` — and nowhere in `listTiles` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `listTiles` 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 packages/agents-server/src/electric-agents/schema-validator.ts:78— `validateSchemaSubset` is exported, takes a document from its caller (line 43) and hands it to `findDisallowedKeywords`, which calls itself at line 78 (`this.findDisallowedKeywords`) with a piece of `obj` (and at line 92, line 100) — and nowhere in `findDisallowedKeywords` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findDisallowedKeywords` 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 packages/agents-runtime/src/model-provider-error.ts:38— `classifyModelProviderError` is exported, takes a document from its caller (line 46) and hands it to `stringifyError`, which calls itself at line 38 (`stringifyError`) with a piece of `error` — and nowhere in `stringifyError` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `stringifyError` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Unbounded dependency requirement: electric_client — Runtime dependency `:electric_client` is declared `">= 0.2.3-rc-1"` in examples/gatekeeper-auth/api/mix.exs, which has no upper bound — every future MAJOR release of `:electric_client` satisfies it, so the next unlocked resolve can pull a breaking change. Use `~>` (e.g. `"~> 1.0"`) to bound the requirement to a compatible range.
Unbounded dependency requirement: postgrex — Runtime dependency `:postgrex` is declared `">= 0.0.0"` in examples/gatekeeper-auth/api/mix.exs, which has no upper bound — every future MAJOR release of `:postgrex` satisfies it, so the next unlocked resolve can pull a breaking change. Use `~>` (e.g. `"~> 1.0"`) to bound the requirement to a compatible range.
Unbounded dependency requirement: postgrex — Runtime dependency `:postgrex` is declared `">= 0.0.0"` in examples/phoenix-liveview/mix.exs, which has no upper bound — every future MAJOR release of `:postgrex` satisfies it, so the next unlocked resolve can pull a breaking change. Use `~>` (e.g. `"~> 1.0"`) to bound the requirement to a compatible range.
Unbounded dependency requirement: electric_client — Runtime dependency `:electric_client` is declared `">= 0.5.0-beta-1"` in examples/phoenix-liveview/mix.exs, which has no upper bound — every future MAJOR release of `:electric_client` satisfies it, so the next unlocked resolve can pull a breaking change. Use `~>` (e.g. `"~> 1.0"`) to bound the requirement to a compatible range.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×4
Edited copy of a member (12 corresponding lines) packages/durable-streams-rust/src/blobstore.rs:121— packages/durable-streams-rust/src/blobstore.rs:121-132 | packages/durable-streams-rust/src/blobstore.rs:134-145 — 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) packages/sync-service/lib/electric/shapes/querying.ex:430— packages/sync-service/lib/electric/shapes/querying.ex:430-443 | packages/sync-service/lib/electric/shapes/shape.ex:899-910 — 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) packages/durable-streams-rust/src/wal/shard.rs:1274— packages/durable-streams-rust/src/wal/shard.rs:1274-1287 | packages/durable-streams-rust/src/wal/shard.rs:1295-1306 — 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) packages/sync-service/lib/electric/connection/manager.ex:405— packages/sync-service/lib/electric/connection/manager.ex:405-416 | packages/sync-service/lib/electric/connection/manager.ex:431-442 — 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 (9 corresponding lines) · ×4
Edited copy of a member (9 corresponding lines) packages/sync-service/lib/electric/shapes/shape.ex:698— packages/sync-service/lib/electric/shapes/shape.ex:698-706 | packages/sync-service/lib/electric/shapes/shape.ex:714-722 — 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) packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:395— packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:395-403 | packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex:581-594 — 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) packages/electric-telemetry/lib/electric/telemetry/application_telemetry.ex:18— packages/electric-telemetry/lib/electric/telemetry/application_telemetry.ex:18-26 | packages/electric-telemetry/lib/electric/telemetry/stack_telemetry.ex:18-26 — 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) examples/burn/lib/burn_web.ex:40— examples/burn/lib/burn_web.ex:40-48 | examples/phoenix-liveview/lib/electric_phoenix_example_web.ex:40-50 — 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.
meshOfStreams.createMeshScene::tryPlaceBundle (cyclomatic 39) website/src/components/brand-toys/meshOfStreams.ts:1436— meshOfStreams.createMeshScene::tryPlaceBundle has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
meshOfStreams.createMeshScene::makeRouteCandidates (cyclomatic 21) website/src/components/brand-toys/meshOfStreams.ts:1117— meshOfStreams.createMeshScene::makeRouteCandidates has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::tryPlaceBundle, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
meshOfStreams.createMeshScene::tryPlaceBundle::buildLane (cyclomatic 17) website/src/components/brand-toys/meshOfStreams.ts:1669— meshOfStreams.createMeshScene::tryPlaceBundle::buildLane has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Hotspot: packages/durable-streams-rust/src/handlers.rs packages/durable-streams-rust/src/handlers.rs:919— packages/durable-streams-rust/src/handlers.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in durable_streams::handlers::handle_append_inner at line 919. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 10:09:42 -06:00' --until='2026-10-06 10:09:42 -06:00' --full-history --no-merges -- packages/durable-streams-rust/src/handlers.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/typescript-client/src/client.ts packages/typescript-client/src/client.ts:1522— packages/typescript-client/src/client.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ShapeStream.#onMessages at line 1522. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 10:09:42 -06:00' --until='2026-10-06 10:09:42 -06:00' --full-history --no-merges -- packages/typescript-client/src/client.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/durable-streams-rust/src/store.rs packages/durable-streams-rust/src/store.rs:661— packages/durable-streams-rust/src/store.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Store::recover at line 661. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 10:09:42 -06:00' --until='2026-10-06 10:09:42 -06:00' --full-history --no-merges -- packages/durable-streams-rust/src/store.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
XxxComment examples/burn/assets/src/components/ComputerAccordion/EventsList.tsx:50— // XXX could be configurable in the UI with a checkbox — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment examples/burn/assets/src/components/ChatArea/ChatInput.tsx:90— // XXX todo: throttle — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment examples/burn/assets/src/components/ChatArea/ChatInput.tsx:91— // XXX todo: handle window resize — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
meshOfStreams.createMeshScene::tryPlaceBundle (cognitive 107) website/src/components/brand-toys/meshOfStreams.ts:1436— meshOfStreams.createMeshScene::tryPlaceBundle has cognitive complexity 107 (threshold 15). Drivers by points: if/else 22 (67 pts), loops 8 (23 pts), ternaries 5 (11 pts), boolean chains 6 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
meshOfStreams.createMeshScene::makeRouteCandidates (cognitive 30) website/src/components/brand-toys/meshOfStreams.ts:1117— meshOfStreams.createMeshScene::makeRouteCandidates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (8 pts), boolean chains 4, ternaries 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. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::tryPlaceBundle, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
meshOfStreams.createMeshScene::tryPlaceBundle::buildLane (cognitive 21) website/src/components/brand-toys/meshOfStreams.ts:1669— meshOfStreams.createMeshScene::tryPlaceBundle::buildLane has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (5 pts), boolean chains 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. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene, meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) packages/sync-service/lib/pg_interop/interval/iso8601_alternative_parser.ex:60— packages/sync-service/lib/pg_interop/interval/iso8601_alternative_parser.ex:60-75 | packages/sync-service/lib/pg_interop/interval/iso8601_alternative_parser.ex:81-94 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) packages/sync-service/lib/electric/postgres/replication_client/message_converter.ex:120— packages/sync-service/lib/electric/postgres/replication_client/message_converter.ex:120-133 | packages/sync-service/lib/electric/postgres/replication_client/message_converter.ex:181-194 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) packages/sync-service/lib/electric/postgres/configuration.ex:86— packages/sync-service/lib/electric/postgres/configuration.ex:86-101 | packages/sync-service/lib/electric/postgres/configuration.ex:202-215 — These two members are one piece of code written twice and then edited apart: 14 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 (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) packages/durable-streams-rust/src/sse_reactor.rs:509— packages/durable-streams-rust/src/sse_reactor.rs:509-523 | packages/durable-streams-rust/src/sse_reactor.rs:525-539 — 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.
Edited copy of a member (15 corresponding lines) packages/electric-telemetry/lib/electric/telemetry/ets_tables.ex:43— packages/electric-telemetry/lib/electric/telemetry/ets_tables.ex:43-58 | packages/electric-telemetry/lib/electric/telemetry/ets_tables.ex:88-102 — 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.
Edited copy of a member (15 corresponding lines) packages/sync-service/lib/electric/shapes/consumer/event_handler/default.ex:23— packages/sync-service/lib/electric/shapes/consumer/event_handler/default.ex:23-37 | packages/sync-service/lib/electric/shapes/consumer/event_handler/subqueries/steady.ex:129-145 — 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 (6 corresponding lines) · ×3
Edited copy of a member (6 corresponding lines) packages/sync-service/lib/electric/shape_cache/shape_status.ex:541— packages/sync-service/lib/electric/shape_cache/shape_status.ex:541-546 | packages/sync-service/lib/electric/shape_cache/shape_status.ex:552-557 — 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) packages/sync-service/lib/electric/shapes/consumer/setup_effects.ex:24— packages/sync-service/lib/electric/shapes/consumer/setup_effects.ex:24-29 | packages/sync-service/lib/electric/utils.ex:103-108 — 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) packages/sync-service/lib/electric/connection/manager.ex:839— packages/sync-service/lib/electric/connection/manager.ex:839-844 | packages/sync-service/lib/electric/connection/manager.ex:855-860 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) packages/sync-service/lib/electric/shapes/shape.ex:700— packages/sync-service/lib/electric/shapes/shape.ex:700-706 | packages/sync-service/lib/electric/shapes/shape.ex:716-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/sync-service/lib/electric/shapes/shape.ex:700` 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 (7 lines × 2) packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:1326— packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:1326-1332 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:102-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) packages/sync-service/lib/electric/shapes/consumer/materializer.ex:407— packages/sync-service/lib/electric/shapes/consumer/materializer.ex:407-413 | packages/sync-service/lib/electric/shapes/consumer/materializer.ex:415-421 — 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.
Unused dependency 'glob' packages/experimental/package.json:20— Declared in packages/experimental/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'glob' packages/react-hooks/package.json:26— Declared in packages/react-hooks/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'glob' packages/typescript-client/package.json:28— Declared in packages/typescript-client/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark packages/agents-server-ui/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/agents/skills/quickstart/scaffold-ui/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
process-wake.processWake::doObserve (cognitive 42) packages/agents-runtime/src/process-wake.ts:1766— process-wake.processWake::doObserve has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (27 pts), if/else 8 (10 pts), boolean chains 5 (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. This shape REPEATS in the file: 2 other methods here (process-wake.processWake, process-wake.processWake::getFreshKind) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
process-wake.processWake::getFreshKind (cognitive 16) packages/agents-runtime/src/process-wake.ts:750— process-wake.processWake::getFreshKind has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (process-wake.processWake, process-wake.processWake::doObserve) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Reactor::run (cognitive 40) packages/durable-streams-rust/src/sse_reactor.rs:240— Reactor::run has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 4 (9 pts), boolean chains 1 (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.
Reactor::produce (cognitive 23) packages/durable-streams-rust/src/sse_reactor.rs:368— Reactor::produce has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, loops 1, match/switch 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.
Store::recover (cognitive 31) packages/durable-streams-rust/src/store.rs:661— Store::recover has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 6 (7 pts), match/switch 1 (4 pts), boolean chains 2 (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.
Store::create (cognitive 24) packages/durable-streams-rust/src/store.rs:1066— Store::create has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 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.
Change coupling: manager.ex ↔ connection_setup.ex packages/sync-service/lib/electric/connection/manager.ex:1— `packages/sync-service/lib/electric/connection/manager.ex` and `packages/sync-service/lib/electric/postgres/replication_client/connection_setup.ex` change together 61% of the time (11 of the 18 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 11 shared commits counted here, the most recent 3 are `128c362f` Fix a bug in LockBreakerConnection (#3509); `656c344a` feat: Move connection lock inside replication connection (#3319); `59f6b14e` feat: Support generated columns in Postgres 18 (#3297) — run `git show` on any of them.
Change coupling: shape_cache.ex ↔ supervisor.ex packages/sync-service/lib/electric/shape_cache.ex:1— `packages/sync-service/lib/electric/shape_cache.ex` and `packages/sync-service/lib/electric/shapes/supervisor.ex` change together 60% of the time (12 of the 20 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 12 shared commits counted here, the most recent 3 are `ba6dd2c7` Move SQLite writes to a background thread and buffer read state (#3716); `370ad3fc` feat: Use separate `ShapeCleaner` process for shape removals to avoid… (at that commit the file was still `packages/sync-service/lib/electric/replication/supervisor.ex`); `662e55a1` feat(sync-service): Improve performance of LRU shape expiry (#3141) (at that commit the file was still `packages/sync-service/lib/electric/replication/supervisor.ex`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) packages/sync-service/lib/electric/replication/eval/parser.ex:1555— packages/sync-service/lib/electric/replication/eval/parser.ex:1555-1583 | packages/sync-service/lib/electric/replication/eval/runner.ex:143-163 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) packages/sync-service/lib/electric/shape_cache/pure_file_storage/key_index.ex:28— packages/sync-service/lib/electric/shape_cache/pure_file_storage/key_index.ex:28-48 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/key_index.ex:93-120 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×2
Edited copy of a member (11 corresponding lines) packages/sync-service/lib/electric/replication/eval/parser.ex:1155— packages/sync-service/lib/electric/replication/eval/parser.ex:1155-1165 | packages/sync-service/lib/electric/replication/eval/parser.ex:1202-1220 — 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) packages/sync-service/lib/electric/connection/supervisor.ex:54— packages/sync-service/lib/electric/connection/supervisor.ex:54-66 | packages/sync-service/lib/electric/replication/publication_manager/supervisor.ex:55-65 — 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 (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) packages/sync-service/lib/electric/replication/eval/env.ex:166— packages/sync-service/lib/electric/replication/eval/env.ex:166-178 | packages/sync-service/lib/electric/replication/eval/env.ex:182-194 — 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) examples/burn/lib/burn/agents/frankie.ex:79— examples/burn/lib/burn/agents/frankie.ex:79-91 | examples/burn/lib/burn/agents/jerry.ex:68-80 — 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 (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) packages/electric-telemetry/lib/electric/telemetry/disk_usage/disk.ex:11— packages/electric-telemetry/lib/electric/telemetry/disk_usage/disk.ex:11-33 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/file_info.ex:62-80 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) packages/durable-streams-rust/src/wal/segment.rs:111— packages/durable-streams-rust/src/wal/segment.rs:111-129 | packages/durable-streams-rust/src/wal/segment.rs:210-228 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) packages/sync-service/lib/electric/replication/eval/parser.ex:116— packages/sync-service/lib/electric/replication/eval/parser.ex:116-130 | packages/sync-service/lib/electric/replication/eval/parser.ex:216-228 | packages/sync-service/lib/electric/replication/eval/parser.ex:368-380 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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.
Edited copies of one member (3 members, 13+ corresponding lines) packages/sync-service/lib/electric/shapes/querying.ex:407— packages/sync-service/lib/electric/shapes/querying.ex:407-426 | packages/sync-service/lib/electric/shapes/querying.ex:463-475 | packages/sync-service/lib/electric/shapes/querying.ex:479-491 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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 (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) packages/sync-service/lib/electric/shapes/filter/indexes/equality_index.ex:145— packages/sync-service/lib/electric/shapes/filter/indexes/equality_index.ex:145-149 | packages/sync-service/lib/electric/shapes/filter/indexes/inclusion_index.ex:318-326 — 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) packages/durable-streams-rust/src/store.rs:113— packages/durable-streams-rust/src/store.rs:113-117 | packages/durable-streams-rust/src/wal/segment.rs:140-144 — 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.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) packages/sync-service/lib/electric/shapes/consumer/materializer.ex:120— packages/sync-service/lib/electric/shapes/consumer/materializer.ex:120-123 | packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex:23-26 — 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) examples/burn/lib/burn/threads/event.ex:52— examples/burn/lib/burn/threads/event.ex:52-55 | examples/burn/lib/burn/tool_call.ex:27-31 — 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 (10 lines × 2) packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex:194— packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex:194-203 | packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex:205-214 — 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) examples/burn/lib/burn_web.ex:69— examples/burn/lib/burn_web.ex:69-78 | examples/phoenix-liveview/lib/electric_phoenix_example_web.ex:71-80 — before extracting anything, compare `examples/burn/lib/burn_web.ex` and `examples/phoenix-liveview/lib/electric_phoenix_example_web.ex` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) packages/sync-service/lib/electric/replication/eval/walker.ex:146— packages/sync-service/lib/electric/replication/eval/walker.ex:146-151 | packages/sync-service/lib/electric/replication/eval/walker.ex:155-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) packages/elixir-client/lib/electric/client/fetch/monitor.ex:23— packages/elixir-client/lib/electric/client/fetch/monitor.ex:23-30 | packages/elixir-client/lib/electric/client/fetch/request.ex:121-126 — 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.
Off the main sequence: electric_telemetry — electric_telemetry: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @electric-sql/client — @electric-sql/client: abstractness 0.15, instability 0.00, distance 0.85 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Duplication concentrated across 2 sibling directories (5 clone groups) packages/agents-mobile/src/components/SearchBar.tsx:80— 5 duplicated blocks under packages/agents-mobile/src/ have copies in at least two of the sibling directories components, screens — 1 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (5 clone groups) packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:239— 5 duplicated blocks under packages/agents-server-ui/src/ have copies in at least two of the sibling directories components, hooks — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (34 lines × 2 locations) packages/agents-mobile/src/lib/sessionBuckets.ts:129— packages/agents-mobile/src/lib/sessionBuckets.ts:129 · packages/agents-server-ui/src/lib/sessionGroups.ts:87 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (34 lines × 2 locations) packages/typescript-client/src/shape-stream-state.ts:678— packages/typescript-client/src/shape-stream-state.ts:678 · packages/typescript-client/src/shape-stream-state.ts:767 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (33 lines × 2 locations) packages/agents-desktop/src/shared/types.ts:216— packages/agents-desktop/src/shared/types.ts:216 · packages/agents-server-ui/src/lib/server-connection.ts:219 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (33 lines × 2 locations) REDACTED:69— REDACTED:69 · packages/agents-runtime/src/types.ts:752 — the 2 copies are spread across 2 files, and the CITED SPAN is inside a TYPE DECLARATION, not executable code. There is no function to extract and no call site to call one from, so do not read this as an extract-a-helper row: the collapse a type offers is a generic — name the shape once, parameterised over the part that varies, and have each copy instantiate it. First check what actually differs between the copies: where they are a MATRIX of cases (one entry per input, differing precisely in the case each one pins), the repetition IS the enumeration and collapsing it would delete cases rather than de-duplicate anything — leave those alone. Reported because the copies that are not a matrix drift apart the first time only one of them is edited.
Duplicated block (32 lines × 2 locations) REDACTED:375— REDACTED:375 · REDACTED:416 — 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 (32 lines × 2 locations) packages/agents-runtime/src/setup-context.ts:949— packages/agents-runtime/src/setup-context.ts:949 · packages/agents-runtime/src/setup-context.ts:1100 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (31 matched lines × 2 locations) · ×2
Duplicated block with local edits (31 matched lines × 2 locations) packages/agents-server-ui/src/hooks/useDarkMode.tsx:17— packages/agents-server-ui/src/hooks/useDarkMode.tsx:17 · packages/agents/skills/quickstart/scaffold-ui/main.tsx:41 — the two spans are one implementation copied and then locally edited — 225 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (31 matched lines × 2 locations) packages/agents-server-ui/src/ui/Box.tsx:12— packages/agents-server-ui/src/ui/Box.tsx:12 · packages/agents-server-ui/src/ui/Stack.tsx:21 — the two spans are one implementation copied and then locally edited — 210 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (29 lines × 2 locations) packages/agents-desktop/src/cloud/cloud-agent-servers.ts:410— packages/agents-desktop/src/cloud/cloud-agent-servers.ts:410 · packages/agents-mobile/src/lib/cloudAgentServers.ts:276 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (29 lines × 2 locations) packages/agents-mobile/src/components/HomeMenu.tsx:637— packages/agents-mobile/src/components/HomeMenu.tsx:637 · packages/agents-server-ui/src/components/SidebarViewMenu.tsx:427 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Dead file (~33 LoC) packages/agents-server-ui/src/embed/stubs/katex.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~33 LoC) packages/agents-server-ui/src/embed/stubs/streamdown-math.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~22 LoC) packages/agents-mobile/src/lib/sentry.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/app/_layout.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~22 LoC) packages/agents-server-ui/src/lib/timelineEntries.ts— no import path from any entry point (71 application, 61 tooling, 288 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
AC2 · Forms & labels· <Textarea> field component without a label · ×1
<Textarea> field component without a label packages/agents-server-ui/src/components/SchemaForm.tsx:367— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
EntityTimeline.EntityTimeline (cyclomatic 116) packages/agents-server-ui/src/components/EntityTimeline.tsx:1378— EntityTimeline.EntityTimeline has cyclomatic complexity 116 (threshold 15). Most of this is not in the body itself: 11 of the 116 points are its own statements and the rest belongs to 42 function literals inside it that branch (lines 1880, 1751, 1660, …). 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.
process-wake.processWake (cyclomatic 105) packages/agents-runtime/src/process-wake.ts:434— process-wake.processWake has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (process-wake.processWake::doObserve) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MessageInput.MessageInput (cyclomatic 93) packages/agents-server-ui/src/components/MessageInput.tsx:53— MessageInput.MessageInput has cyclomatic complexity 93 (threshold 15). Of this number, 53 points are the body's own statements and 40 belong to 22 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.
entity-stream-db.createEntityStreamDB (cyclomatic 86) packages/agents-runtime/src/entity-stream-db.ts:167— entity-stream-db.createEntityStreamDB has cyclomatic complexity 86 (threshold 15). Of this number, 17 points are the body's own statements and 69 belong to 21 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.
ComposerEditor.ComposerEditorEvents (cyclomatic 74) REDACTED:438— ComposerEditor.ComposerEditorEvents has cyclomatic complexity 74 (threshold 15). Most of this is not in the body itself: 1 of the 74 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 752, 559, 487, …). 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.
SessionScreen.NativeMessageComposer (cyclomatic 73) packages/agents-mobile/src/screens/SessionScreen.tsx:495— SessionScreen.NativeMessageComposer has cyclomatic complexity 73 (threshold 15). Of this number, 36 points are the body's own statements and 37 belong to 18 function items 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.
NewSessionView.NewSessionView (cyclomatic 58) packages/agents-server-ui/src/components/views/NewSessionView.tsx:153— NewSessionView.NewSessionView has cyclomatic complexity 58 (threshold 15). Of this number, 16 points are the body's own statements and 42 belong to 13 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.
ShareEntityDialog.ShareEntityDialog (cyclomatic 57) packages/agents-server-ui/src/components/ShareEntityDialog.tsx:102— ShareEntityDialog.ShareEntityDialog has cyclomatic complexity 57 (threshold 15). Of this number, 21 points are the body's own statements and 36 belong to 14 function items 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.
SearchPalette.SearchPalette (cyclomatic 56) packages/agents-server-ui/src/components/SearchPalette.tsx:126— SearchPalette.SearchPalette has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 4 of the 56 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 179, 549, 503, …). 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.
SplitMenu.SplitMenu (cyclomatic 56) packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:153— SplitMenu.SplitMenu has cyclomatic complexity 56 (threshold 15). Of this number, 38 points are the body's own statements and 18 belong to 7 function items 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.
pi-adapter.createPiAgentAdapter.<returned closure>.processAgentEvents::processQueue (cyclomatic 52) packages/agents-runtime/src/pi-adapter.ts:385— pi-adapter.createPiAgentAdapter.<returned closure>.processAgentEvents::processQueue 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.
registry.createRegistry (cyclomatic 51) packages/agents-mcp/src/registry.ts:163— registry.createRegistry has cyclomatic complexity 51 (threshold 15). Of this number, 31 points are the body's own statements and 20 belong to 3 function items 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.
SessionScreen.SessionScreen (cyclomatic 51) packages/agents-mobile/src/screens/SessionScreen.tsx:154— SessionScreen.SessionScreen has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 15 of the 51 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 396, 340, 296, …). 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.
NewSessionView.DefaultAgentComposer (cyclomatic 50) packages/agents-server-ui/src/components/views/NewSessionView.tsx:887— NewSessionView.DefaultAgentComposer has cyclomatic complexity 50 (threshold 15). Of this number, 25 points are the body's own statements and 25 belong to 6 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.
AgentResponse.AgentResponseLive (cyclomatic 48) packages/agents-server-ui/src/components/AgentResponse.tsx:464— AgentResponse.AgentResponseLive has cyclomatic complexity 48 (threshold 15). Of this number, 29 points are the body's own statements and 19 belong to 9 function items 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.
LocalRuntimePage.LocalRuntimePage (cyclomatic 47) packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:151— LocalRuntimePage.LocalRuntimePage has cyclomatic complexity 47 (threshold 15). Of this number, 23 points are the body's own statements and 24 belong to 14 function items 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.
meshOfStreams.createMeshScene (cyclomatic 45) website/src/components/brand-toys/meshOfStreams.ts:930— meshOfStreams.createMeshScene 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. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
internal-router.wakeCallback (cyclomatic 43) packages/agents-server/src/routing/internal-router.ts:669— internal-router.wakeCallback has cyclomatic complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong 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.
Workspace.Workspace (cyclomatic 42) packages/agents-server-ui/src/components/workspace/Workspace.tsx:32— Workspace.Workspace has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 12 of the 42 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 118, 60, 206, …). 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.
Sidebar.Sidebar (cyclomatic 41) packages/agents-server-ui/src/components/Sidebar.tsx:123— Sidebar.Sidebar has cyclomatic complexity 41 (threshold 15). Of this number, 21 points are the body's own statements and 20 belong to 13 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.
router.RootShell (cyclomatic 41) packages/agents-server-ui/src/router.tsx:136— router.RootShell has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 289, 230, 240, …). 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.
EntityManager.spawnInner (cyclomatic 40) packages/agents-server/src/entity-manager.ts:636— EntityManager.spawnInner has cyclomatic complexity 40 (threshold 15). Of this number, 39 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.
AgentResponse.AgentResponse (cyclomatic 39) packages/agents-server-ui/src/components/AgentResponse.tsx:876— AgentResponse.AgentResponse has cyclomatic complexity 39 (threshold 15). Of this number, 29 points are the body's own statements and 10 belong to 4 function items 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.
ShareSessionScreen.ShareSessionScreen (cyclomatic 38) packages/agents-mobile/src/screens/ShareSessionScreen.tsx:106— ShareSessionScreen.ShareSessionScreen has cyclomatic complexity 38 (threshold 15). Of this number, 17 points are the body's own statements and 21 belong to 9 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.
McpServersPage.ServerEntry (cyclomatic 38) packages/agents-server-ui/src/components/settings/pages/McpServersPage.tsx:154— McpServersPage.ServerEntry 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.
SessionMenu.SessionMenu (cyclomatic 37) packages/agents-mobile/src/components/SessionMenu.tsx:122— SessionMenu.SessionMenu has cyclomatic complexity 37 (threshold 15). Of this number, 30 points are the body's own statements and 7 belong to 5 function items 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.
ApiKeysForm.ApiKeysForm (cyclomatic 37) packages/agents-server-ui/src/components/ApiKeysForm.tsx:72— ApiKeysForm.ApiKeysForm has cyclomatic complexity 37 (threshold 15). Of this number, 31 points are the body's own statements and 6 belong to 4 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.
EntityManager.forkSubtreeInner (cyclomatic 37) packages/agents-server/src/entity-manager.ts:962— EntityManager.forkSubtreeInner has cyclomatic complexity 37 (threshold 15). Of this number, 36 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.
context-factory.createHandlerContext (cyclomatic 36) packages/agents-runtime/src/context-factory.ts:513— context-factory.createHandlerContext has cyclomatic complexity 36 (threshold 15). Of this number, 16 points are the body's own statements and 20 belong to 7 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.
SessionListScreen.SessionListScreen (cyclomatic 35) packages/agents-mobile/src/screens/SessionListScreen.tsx:69— SessionListScreen.SessionListScreen has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 178, 128, 136, …). 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.
horton.createAssistantHandler.assistantHandler (cyclomatic 35) packages/agents/src/agents/horton.ts:645— horton.createAssistantHandler.assistantHandler has cyclomatic complexity 35 (threshold 15). Of this number, 25 points are the body's own statements and 10 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.
context-assembly.assembleContext (cyclomatic 34) packages/agents-runtime/src/context-assembly.ts:213— context-assembly.assembleContext 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.
CredentialsPage.CredentialsPage (cyclomatic 34) packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32— CredentialsPage.CredentialsPage has cyclomatic complexity 34 (threshold 15). Of this number, 18 points are the body's own statements and 16 belong to 8 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.
EntityManager.remapManifestEntry (cyclomatic 32) packages/agents-server/src/entity-manager.ts:2076— EntityManager.remapManifestEntry 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.
useServerConnection.ServerConnectionProvider (cyclomatic 31) packages/agents-server-ui/src/hooks/useServerConnection.tsx:115— useServerConnection.ServerConnectionProvider has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 136, 215, 205, …). 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.
ShapeStream.#requestShape (cyclomatic 31) packages/typescript-client/src/client.ts:970— ShapeStream.#requestShape 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.
GeneralPage.GeneralPage (cyclomatic 30) packages/agents-server-ui/src/components/settings/pages/GeneralPage.tsx:42— GeneralPage.GeneralPage has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body's own statements and 15 belong to 9 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.
AgentResponse.MarkdownSegment (cyclomatic 30) packages/agents-server-ui/src/components/AgentResponse.tsx:74— AgentResponse.MarkdownSegment has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 211, a function literal at line 94, a function literal at line 108, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WakeRegistry.matchCondition (cyclomatic 30) packages/agents-server/src/wake-registry.ts:908— WakeRegistry.matchCondition 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.
manifest-side-effects.extractManifestSourceUrl (cyclomatic 30) packages/agents-server/src/manifest-side-effects.ts:13— manifest-side-effects.extractManifestSourceUrl 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.
EntityContextDrawer.PendingInboxSection (cyclomatic 29) packages/agents-server-ui/src/components/EntityContextDrawer.tsx:286— EntityContextDrawer.PendingInboxSection has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (reorderMessage, a function literal at line 383, a function literal at line 407, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
StateExplorerPanel.StateExplorerPanel (cyclomatic 29) packages/agents-server-ui/src/components/stateExplorer/StateExplorerPanel.tsx:200— StateExplorerPanel.StateExplorerPanel has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 317, 326, 251, …). 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.
lifecycle.startRuntime (cyclomatic 28) packages/agents-desktop/src/runtime/lifecycle.ts:188— lifecycle.startRuntime has cyclomatic complexity 28 (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.
SidebarViewMenu.SidebarViewMenu (cyclomatic 28) packages/agents-server-ui/src/components/SidebarViewMenu.tsx:70— SidebarViewMenu.SidebarViewMenu has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 132, 175, 114, …). 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.
SidebarRow.SidebarRow (cyclomatic 27) packages/agents-server-ui/src/components/SidebarRow.tsx:106— SidebarRow.SidebarRow has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 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.
SchemaForm.ObjectSchemaForm (cyclomatic 27) packages/agents-server-ui/src/components/SchemaForm.tsx:63— SchemaForm.ObjectSchemaForm has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 103, 82, 117). 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.
process-wake.processWake::doObserve (cyclomatic 26) packages/agents-runtime/src/process-wake.ts:1766— process-wake.processWake::doObserve has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (process-wake.processWake) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
PaneFindBar.PaneFindBar (cyclomatic 26) packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:37— PaneFindBar.PaneFindBar has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 99, 74, 161, …). 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.
ServersPage.ServerRow (cyclomatic 26) packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:250— ServersPage.ServerRow has cyclomatic complexity 26 (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.
McpServerFormDialog.buildConfig (cyclomatic 26) packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:141— McpServerFormDialog.buildConfig 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.
EntityContextDrawer.EntityContextDrawer (cyclomatic 26) packages/agents-server-ui/src/components/EntityContextDrawer.tsx:106— EntityContextDrawer.EntityContextDrawer has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 149, a function literal at line 170, handleEntry, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ChatView.GenericChatBody (cyclomatic 26) packages/agents-server-ui/src/components/views/ChatView.tsx:236— ChatView.GenericChatBody has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 7 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.
OnboardingModal.OnboardingModal (cyclomatic 25) packages/agents-server-ui/src/components/OnboardingModal.tsx:148— OnboardingModal.OnboardingModal has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 173, 214, 162, …). 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.
CommandLinePage.CommandLinePage (cyclomatic 25) packages/agents-server-ui/src/components/settings/pages/CommandLinePage.tsx:31— CommandLinePage.CommandLinePage has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to 3 function items 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.
shape-stream-static-analysis.formatAnalysisResult (cyclomatic 25) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:518— shape-stream-static-analysis.formatAnalysisResult 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.
ShapeStream.#constructUrl (cyclomatic 25) packages/typescript-client/src/client.ts:1213— ShapeStream.#constructUrl 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.
simulate.applyBeat (cyclomatic 25) website/src/components/home/iso/simulate.ts:331— simulate.applyBeat 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.
loader.parseConfig (cyclomatic 24) packages/agents-mcp/src/config/loader.ts:22— loader.parseConfig 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.
DropOverlay.DropOverlay (cyclomatic 24) packages/agents-server-ui/src/components/workspace/DropOverlay.tsx:29— DropOverlay.DropOverlay has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 88, 129, 64, …). 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.
ToolCallView.ToolBody (cyclomatic 24) packages/agents-server-ui/src/components/ToolCallView.tsx:142— ToolCallView.ToolBody has cyclomatic complexity 24 (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.
internal-router.subscriptionWebhook (cyclomatic 24) packages/agents-server/src/routing/internal-router.ts:427— internal-router.subscriptionWebhook has cyclomatic complexity 24 (threshold 15). Of this number, 23 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.
store.loadDesktopSettings (cyclomatic 23) packages/agents-desktop/src/settings/store.ts:134— store.loadDesktopSettings has cyclomatic complexity 23 (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.
HomeMenu.HomeMenu (cyclomatic 23) packages/agents-mobile/src/components/HomeMenu.tsx:68— HomeMenu.HomeMenu has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 4 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.
setup-context.createSetupContext::ensureObservedHandle (cyclomatic 23) packages/agents-runtime/src/setup-context.ts:697— setup-context.createSetupContext::ensureObservedHandle 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. This shape REPEATS in the file: one other method here (setup-context.createSetupContext) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
setup-context.createSetupContext (cyclomatic 23) packages/agents-runtime/src/setup-context.ts:229— setup-context.createSetupContext 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. This shape REPEATS in the file: one other method here (setup-context.createSetupContext::ensureObservedHandle) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
runners-router.runnerHealth (cyclomatic 23) packages/agents-server/src/routing/runners-router.ts:441— runners-router.runnerHealth has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function item 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.
Shape.#process (cyclomatic 23) packages/typescript-client/src/shape.ts:198— Shape.#process has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 201). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
model-provider-error.classifyModelProviderError (cyclomatic 22) packages/agents-runtime/src/model-provider-error.ts:46— model-provider-error.classifyModelProviderError has cyclomatic complexity 22 (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.
useWorkspacePersistence.useWorkspacePersistence (cyclomatic 22) packages/agents-server-ui/src/hooks/useWorkspacePersistence.ts:48— useWorkspacePersistence.useWorkspacePersistence has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 85, 67, 152, …). 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.
SchemaForm.SchemaField (cyclomatic 22) packages/agents-server-ui/src/components/SchemaForm.tsx:173— SchemaForm.SchemaField 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, 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.
ReplicationConnection.handle (cyclomatic 21) packages/sync-service/lib/electric/postgres/replication_connection.ex:374— ReplicationConnection.handle has cyclomatic complexity 21 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
NewSessionScreen.NewSessionScreen (cyclomatic 21) packages/agents-mobile/src/screens/NewSessionScreen.tsx:66— NewSessionScreen.NewSessionScreen has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (NewSessionScreen.NewSessionScreen::start) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ServersPage.ServersPage (cyclomatic 21) packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:64— ServersPage.ServersPage has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (connectAvailableServer, a function literal at line 161, a function literal at line 154, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
meshOfStreams.hasSelfOverlapOrIntersection (cyclomatic 21) website/src/components/brand-toys/meshOfStreams.ts:276— meshOfStreams.hasSelfOverlapOrIntersection 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.
render.collectScene (cyclomatic 21) website/src/components/home/iso/render.ts:92— render.collectScene has cyclomatic complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Materializer.apply_changes (cyclomatic 20) packages/sync-service/lib/electric/shapes/consumer/materializer.ex:536— Materializer.apply_changes 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.
CloudAuth.signIn (cyclomatic 20) packages/agents-desktop/src/cloud/cloud-auth.ts:276— CloudAuth.signIn has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (settle, tryIntercept, a function literal at line 329, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
servers.normalizeServer (cyclomatic 20) packages/agents-desktop/src/settings/servers.ts:9— servers.normalizeServer 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.
webhook-sources.webhookSourceWakeInfoFromManifests (cyclomatic 20) packages/agents-runtime/src/webhook-sources.ts:346— webhook-sources.webhookSourceWakeInfoFromManifests 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.
EntityManager.send (cyclomatic 20) packages/agents-server/src/entity-manager.ts:2362— EntityManager.send 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.
worker.parseWorkerArgs (cyclomatic 20) packages/agents/src/agents/worker.ts:51— worker.parseWorkerArgs 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.
BuiltinAgentsServer.start (cyclomatic 20) packages/agents/src/server.ts:184— BuiltinAgentsServer.start has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong 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.
serve-markdown.default (cyclomatic 20) website/netlify/edge-functions/serve-markdown.ts:76— serve-markdown.default has cyclomatic complexity 20 (threshold 15). Of this number, 19 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.
ServerSetupScreen.ServerSetupScreen (cyclomatic 19) packages/agents-mobile/src/screens/ServerSetupScreen.tsx:29— ServerSetupScreen.ServerSetupScreen has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 3 function items 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.
SessionScreen.NativeEntityContextDrawer (cyclomatic 19) packages/agents-mobile/src/screens/SessionScreen.tsx:947— SessionScreen.NativeEntityContextDrawer has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 980, selectEntry, a function literal at line 1001, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
use-chat.buildAgentSection (cyclomatic 19) packages/agents-runtime/src/use-chat.ts:276— use-chat.buildAgentSection has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 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.
preamble.parsePreamble (cyclomatic 19) packages/agents-runtime/src/skills/preamble.ts:10— preamble.parsePreamble 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.
McpServerFormDialog.McpServerFormDialog (cyclomatic 19) packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:268— McpServerFormDialog.McpServerFormDialog has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 4 function items 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.
EntityTimeline.ManifestTimelineRow (cyclomatic 19) packages/agents-server-ui/src/components/EntityTimeline.tsx:842— EntityTimeline.ManifestTimelineRow has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 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.
durable-streams-router.rewriteSubscriptionResponseForClient (cyclomatic 19) packages/agents-server/src/routing/durable-streams-router.ts:207— durable-streams-router.rewriteSubscriptionResponseForClient has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 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.
durable-streams-router.authorizeDurableStreamAccess (cyclomatic 19) packages/agents-server/src/routing/durable-streams-router.ts:643— durable-streams-router.authorizeDurableStreamAccess 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.
spawnArgs.buildInitialSpawnArgs (cyclomatic 18) packages/agents-mobile/src/lib/spawnArgs.ts:95— spawnArgs.buildInitialSpawnArgs 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.
NewSessionScreen.NewSessionScreen::start (cyclomatic 18) packages/agents-mobile/src/screens/NewSessionScreen.tsx:243— NewSessionScreen.NewSessionScreen::start has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (NewSessionScreen.NewSessionScreen) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ElectricAgentsProvider.createSpawnAction (cyclomatic 18) packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:522— ElectricAgentsProvider.createSpawnAction has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 543). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
OnboardingModal.ConfigStep (cyclomatic 18) packages/agents-server-ui/src/components/OnboardingModal.tsx:318— OnboardingModal.ConfigStep has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item 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.
manifest-side-effects.buildManifestWakeRegistration (cyclomatic 18) packages/agents-server/src/manifest-side-effects.ts:133— manifest-side-effects.buildManifestWakeRegistration has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong 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.
shape-stream-static-analysis.buildClassInfo (cyclomatic 18) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:692— shape-stream-static-analysis.buildClassInfo 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.
simulate.tickScene (cyclomatic 18) website/src/components/home/iso/simulate.ts:68— simulate.tickScene 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.
Store::recover (cyclomatic 17) packages/durable-streams-rust/src/store.rs:661— Store::recover 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.
useAvailableServers.useAvailableServers (cyclomatic 17) packages/agents-server-ui/src/hooks/useAvailableServers.ts:48— useAvailableServers.useAvailableServers has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 129, 62, 65, …). 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.
OnboardingModal.ServerStep (cyclomatic 17) packages/agents-server-ui/src/components/OnboardingModal.tsx:968— OnboardingModal.ServerStep has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (finish, connectAvailableServer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
InlineEventCard.InlineEventCard (cyclomatic 17) packages/agents-server-ui/src/components/InlineEventCard.tsx:7— InlineEventCard.InlineEventCard 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.
StateTable.StateTable (cyclomatic 17) packages/agents-server-ui/src/components/stateExplorer/StateTable.tsx:47— StateTable.StateTable has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 68, 96, 101, …). 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.
NewSessionView.CodexDetectedPrompt (cyclomatic 17) packages/agents-server-ui/src/components/views/NewSessionView.tsx:675— NewSessionView.CodexDetectedPrompt has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 5 function items 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.
SchemaValidator.findDisallowedKeywords (cyclomatic 17) packages/agents-server/src/electric-agents/schema-validator.ts:59— SchemaValidator.findDisallowedKeywords 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.
stream-append.handleStreamAppend (cyclomatic 17) packages/agents-server/src/routing/stream-append.ts:85— stream-append.handleStreamAppend 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.
entities-router.forkEntity (cyclomatic 17) REDACTED:1184— entities-router.forkEntity 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.
runners-router.sanitizeRunnerDiagnostics (cyclomatic 17) packages/agents-server/src/routing/runners-router.ts:158— runners-router.sanitizeRunnerDiagnostics 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.
ElectricAgentsServer.buildTenantContext (cyclomatic 17) REDACTED:392— ElectricAgentsServer.buildTenantContext 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.
main.App (cyclomatic 17) packages/agents/skills/quickstart/scaffold-ui/main.tsx:265— main.App has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 5 function items 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.
shape-stream-static-analysis.analyzeStateMachine (cyclomatic 17) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:332— shape-stream-static-analysis.analyzeStateMachine has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong 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.
client.validateOptions (cyclomatic 17) packages/typescript-client/src/client.ts:2498— client.validateOptions 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.
meshOfStreams.segmentsIntersectOrOverlap (cyclomatic 17) website/src/components/brand-toys/meshOfStreams.ts:438— meshOfStreams.segmentsIntersectOrOverlap 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.
ServeShapePlug.open_telemetry_attrs (cyclomatic 16) packages/sync-service/lib/electric/plug/serve_shape_plug.ex:560— ServeShapePlug.open_telemetry_attrs has cyclomatic complexity 16 (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.
server-fetch.assertDesktopServerFetchAllowed (cyclomatic 16) packages/agents-desktop/src/cloud/server-fetch.ts:20— server-fetch.assertDesktopServerFetchAllowed 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.
tray.updateTray (cyclomatic 16) packages/agents-desktop/src/ui/tray.ts:65— tray.updateTray has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 107, 167, 72, …). 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.
cloudAgentServers.useCloudAgentServers (cyclomatic 16) packages/agents-mobile/src/lib/cloudAgentServers.ts:205— cloudAgentServers.useCloudAgentServers has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 260, 294, 276, …). 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.
SessionRow.SessionRow (cyclomatic 16) packages/agents-mobile/src/components/SessionRow.tsx:55— SessionRow.SessionRow has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
composer-input.validateSlashCommandArguments (cyclomatic 16) packages/agents-runtime/src/composer-input.ts:403— composer-input.validateSlashCommandArguments has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 418). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
webhook-sources.resolveWebhookSourceSubscription (cyclomatic 16) packages/agents-runtime/src/webhook-sources.ts:182— webhook-sources.resolveWebhookSourceSubscription 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.
registry.renderSkillList (cyclomatic 16) packages/agents-runtime/src/skills/registry.ts:154— registry.renderSkillList 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.
schedules.getScheduleEntries (cyclomatic 16) packages/agents-runtime/src/tools/schedules.ts:115— schedules.getScheduleEntries 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.
webhook-sources.getWebhookSourceSubscriptions (cyclomatic 16) packages/agents-runtime/src/tools/webhook-sources.ts:90— webhook-sources.getWebhookSourceSubscriptions 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.
ServerPicker.ServerPicker (cyclomatic 16) packages/agents-server-ui/src/components/ServerPicker.tsx:36— ServerPicker.ServerPicker has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (connectAvailableServer, a function literal at line 53, a function literal at line 62, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MarkdownCodeBlock.FencedCodeBlock (cyclomatic 16) REDACTED:150— MarkdownCodeBlock.FencedCodeBlock has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 192, 184, 203, …). 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.
ReasoningSection.ReasoningBlock (cyclomatic 16) packages/agents-server-ui/src/components/ReasoningSection.tsx:63— ReasoningSection.ReasoningBlock has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong 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.
AgentResponse.ResponseMetaActions (cyclomatic 16) packages/agents-server-ui/src/components/AgentResponse.tsx:774— AgentResponse.ResponseMetaActions has cyclomatic complexity 16 (threshold 15). Of this number, 15 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.
CompactionIndicator.CompactionIndicator (cyclomatic 16) packages/agents-server-ui/src/components/CompactionIndicator.tsx:28— CompactionIndicator.CompactionIndicator has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 39, 57, 32). 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.
WorkingDirectoryPicker.WorkingDirectoryPicker (cyclomatic 16) packages/agents-server-ui/src/components/WorkingDirectoryPicker.tsx:38— WorkingDirectoryPicker.WorkingDirectoryPicker has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 87, 111, 78, …). 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.
pg-sync-bridge-manager.buildElectricShapeParams (cyclomatic 16) packages/agents-server/src/pg-sync-bridge-manager.ts:80— pg-sync-bridge-manager.buildElectricShapeParams 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.
WakeRegistry.evaluate (cyclomatic 16) packages/agents-server/src/wake-registry.ts:765— WakeRegistry.evaluate has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong 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.
observe-ui.MessageInput (cyclomatic 16) packages/electric-ax/src/observe-ui.tsx:390— observe-ui.MessageInput has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 469, 429). 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.
observe-ui.ObserveView (cyclomatic 16) packages/electric-ax/src/observe-ui.tsx:667— observe-ui.ObserveView has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 725, 695). 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.
cli.main (cyclomatic 16) packages/start/src/cli.ts:169— cli.main 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.
shape-stream-static-analysis.buildErrorPathPublishReport (cyclomatic 16) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:1044— shape-stream-static-analysis.buildErrorPathPublishReport has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1055, 1075, 1053). 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.
parser.pgArrayParser (cyclomatic 16) packages/typescript-client/src/parser.ts:44— parser.pgArrayParser has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function items inside it that branch (loop, extractValue). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ShapeStream.#start (cyclomatic 16) packages/typescript-client/src/client.ts:840— ShapeStream.#start 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.
ShapeStream.#onMessages (cyclomatic 16) packages/typescript-client/src/client.ts:1522— ShapeStream.#onMessages has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×1
Fixed-sleep synchronisation: continues in-process when a new message arrives after the first handler pass packages/agents-runtime/test/process-wake.test.ts:2050— This test starts work it did not wait for (`wakePromise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 5))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Retired release: electric_phoenix — `:electric_phoenix` is pinned to 0.2.0 in the committed REDACTED, and the publisher deprecated it on hex.pm — "electric_phoenix has been superceded by phoenix_sync". A retired release is one the publisher has asked you to stop using. The current stable release is 0.2.1. Move off it and commit the updated lockfile.
process-wake.processWake (cognitive 190) packages/agents-runtime/src/process-wake.ts:434— process-wake.processWake has cognitive complexity 190 (threshold 15). Drivers by points: if/else 144 (224 pts), ternaries 53 (104 pts), boolean chains 59, error handling 16 (29 pts), loops 18 (22 pts), match/switch 1 (nesting depth added 148). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (process-wake.processWake::getFreshKind, process-wake.processWake::doObserve) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
EntityTimeline.EntityTimeline (cognitive 131) packages/agents-server-ui/src/components/EntityTimeline.tsx:1378— EntityTimeline.EntityTimeline has cognitive complexity 131 (threshold 15). Drivers by points: if/else 66 (79 pts), boolean chains 20, ternaries 12 (18 pts), loops 10 (14 pts) (nesting depth added 23). Most of this is not in the body itself: 10 of the 131 points are its own statements and the rest belongs to 42 function literals inside it that branch (lines 1880, 1751, 1564, …). 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.
ComposerEditor.ComposerEditorEvents (cognitive 102) REDACTED:438— ComposerEditor.ComposerEditorEvents has cognitive complexity 102 (threshold 15). Drivers by points: if/else 45 (73 pts), boolean chains 20, ternaries 6 (9 pts) (nesting depth added 31). None of this is in the body itself: all 102 points belong to 9 function literals inside it that branch (lines 752, 559, 487, …). 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.
pi-adapter.createPiAgentAdapter.<returned closure>.processAgentEvents::processQueue (cognitive 99) packages/agents-runtime/src/pi-adapter.ts:385— pi-adapter.createPiAgentAdapter.<returned closure>.processAgentEvents::processQueue has cognitive complexity 99 (threshold 15). Drivers by points: if/else 20 (49 pts), ternaries 9 (34 pts), boolean chains 11, error handling 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageInput.MessageInput (cognitive 91) packages/agents-server-ui/src/components/MessageInput.tsx:53— MessageInput.MessageInput has cognitive complexity 91 (threshold 15). Drivers by points: ternaries 30 (40 pts), if/else 29 (30 pts), boolean chains 21 (nesting depth added 11). Of this number, 46 points are the body's own statements and 45 belong to 22 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.
meshOfStreams.createMeshScene (cognitive 88) website/src/components/brand-toys/meshOfStreams.ts:930— meshOfStreams.createMeshScene has cognitive complexity 88 (threshold 15). Drivers by points: if/else 83 (194 pts), loops 40 (73 pts), ternaries 19 (32 pts), boolean chains 23 (nesting depth added 157). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (meshOfStreams.createMeshScene::makeRouteCandidates, meshOfStreams.createMeshScene::tryPlaceBundle, meshOfStreams.createMeshScene::tryPlaceBundle::buildLane) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SessionScreen.NativeMessageComposer (cognitive 69) packages/agents-mobile/src/screens/SessionScreen.tsx:495— SessionScreen.NativeMessageComposer has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 27, if/else 21 (23 pts), ternaries 16 (19 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 39 belong to 18 function items 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.
SearchPalette.SearchPalette (cognitive 69) packages/agents-server-ui/src/components/SearchPalette.tsx:126— SearchPalette.SearchPalette has cognitive complexity 69 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 14, ternaries 5 (7 pts) (nesting depth added 21). Most of this is not in the body itself: 2 of the 69 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 179, 503, 549, …). 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.
internal-router.wakeCallback (cognitive 68) packages/agents-server/src/routing/internal-router.ts:669— internal-router.wakeCallback has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (29 pts), ternaries 10 (29 pts), boolean chains 8, error handling 2 (nesting depth added 29). Of this number, 50 points are the body's own statements and 18 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.
McpServersPage.ServerEntry (cognitive 65) packages/agents-server-ui/src/components/settings/pages/McpServersPage.tsx:154— McpServersPage.ServerEntry has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 13 (48 pts), boolean chains 14, if/else 3 (nesting depth added 35). 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.
context-assembly.assembleContext (cognitive 62) packages/agents-runtime/src/context-assembly.ts:213— context-assembly.assembleContext has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 11 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manifest-side-effects.extractManifestSourceUrl (cognitive 61) packages/agents-server/src/manifest-side-effects.ts:13— manifest-side-effects.extractManifestSourceUrl has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 11 (32 pts), if/else 14 (26 pts), boolean chains 3 (nesting depth added 33). 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.
ShareEntityDialog.ShareEntityDialog (cognitive 57) packages/agents-server-ui/src/components/ShareEntityDialog.tsx:102— ShareEntityDialog.ShareEntityDialog has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (24 pts), ternaries 15 (17 pts), boolean chains 11, error handling 3, loops 2 (nesting depth added 6). Of this number, 17 points are the body's own statements and 40 belong to 14 function items 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, 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.
NewSessionView.NewSessionView (cognitive 57) packages/agents-server-ui/src/components/views/NewSessionView.tsx:153— NewSessionView.NewSessionView has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 18 (24 pts), if/else 17 (18 pts), boolean chains 14, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 12 of the 57 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 341, 242, 454, …). 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.
Shape.#process (cognitive 54) packages/typescript-client/src/shape.ts:198— Shape.#process has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (46 pts), match/switch 3 (8 pts) (nesting depth added 36). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to one function literal inside it that branches (line 201). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
EntityManager.spawnInner (cognitive 53) packages/agents-server/src/entity-manager.ts:636— EntityManager.spawnInner has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (30 pts), ternaries 7 (11 pts), boolean chains 10, error handling 1, loops 1 (nesting depth added 15). Of this number, 52 points are the body's own statements and 1 belongs 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.
EntityManager.remapManifestEntry (cognitive 53) packages/agents-server/src/entity-manager.ts:2076— EntityManager.remapManifestEntry has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 8 (18 pts), boolean chains 6, loops 1 (2 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.
meshOfStreams.hasSelfOverlapOrIntersection (cognitive 53) website/src/components/brand-toys/meshOfStreams.ts:276— meshOfStreams.hasSelfOverlapOrIntersection has cognitive complexity 53 (threshold 15). Drivers by points: if/else 9 (34 pts), ternaries 4 (12 pts), boolean chains 4, loops 2 (3 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.
EntityManager.forkSubtreeInner (cognitive 52) packages/agents-server/src/entity-manager.ts:962— EntityManager.forkSubtreeInner has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 10 (14 pts), ternaries 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 16). Of this number, 50 points are the body's own statements and 2 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.
horton.createAssistantHandler.assistantHandler (cognitive 51) packages/agents/src/agents/horton.ts:645— horton.createAssistantHandler.assistantHandler has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 12 (18 pts), boolean chains 8, error handling 3 (6 pts) (nesting depth added 18). Of this number, 28 points are the body's own statements and 23 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.
LocalRuntimePage.LocalRuntimePage (cognitive 50) packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:151— LocalRuntimePage.LocalRuntimePage has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 15 (21 pts), boolean chains 14, if/else 13, error handling 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 28 belong to 14 function items 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.
NewSessionView.DefaultAgentComposer (cognitive 50) packages/agents-server-ui/src/components/views/NewSessionView.tsx:887— NewSessionView.DefaultAgentComposer has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 21, if/else 10 (15 pts), ternaries 11 (12 pts), loops 2 (nesting depth added 6). Of this number, 21 points are the body's own statements and 29 belong to 6 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.
shape-stream-static-analysis.formatAnalysisResult (cognitive 50) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:518— shape-stream-static-analysis.formatAnalysisResult has cognitive complexity 50 (threshold 15). Drivers by points: loops 9 (19 pts), ternaries 7 (19 pts), if/else 7 (10 pts), boolean chains 2 (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.
McpServerFormDialog.buildConfig (cognitive 49) packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:141— McpServerFormDialog.buildConfig has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27 (42 pts), ternaries 3 (4 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.
SessionScreen.SessionScreen (cognitive 48) packages/agents-mobile/src/screens/SessionScreen.tsx:154— SessionScreen.SessionScreen has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (26 pts), ternaries 6 (9 pts), boolean chains 7, error handling 3, loops 3 (nesting depth added 8). Most of this is not in the body itself: 6 of the 48 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 340, 396, 296, …). 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.
internal-router.subscriptionWebhook (cognitive 48) packages/agents-server/src/routing/internal-router.ts:427— internal-router.subscriptionWebhook has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (31 pts), ternaries 5 (12 pts), boolean chains 4, error handling 1 (nesting depth added 25). Of this number, 44 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
CredentialsPage.CredentialsPage (cognitive 47) packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32— CredentialsPage.CredentialsPage has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 6 (16 pts), boolean chains 15, error handling 3 (9 pts), if/else 5 (7 pts) (nesting depth added 18). Most of this is not in the body itself: 14 of the 47 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 105, a function literal at line 183, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
context-factory.createHandlerContext (cognitive 45) packages/agents-runtime/src/context-factory.ts:513— context-factory.createHandlerContext has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (29 pts), ternaries 6 (7 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 12). Of this number, 19 points are the body's own statements and 26 belong to 7 function items 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.
loader.parseConfig (cognitive 44) packages/agents-mcp/src/config/loader.ts:22— loader.parseConfig has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 4 (12 pts), boolean chains 6, loops 3 (4 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.
Workspace.Workspace (cognitive 44) packages/agents-server-ui/src/components/workspace/Workspace.tsx:32— Workspace.Workspace has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 14, ternaries 9 (11 pts) (nesting depth added 4). Most of this is not in the body itself: 9 of the 44 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 118, 60, 206, …). 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.
ShareSessionScreen.ShareSessionScreen (cognitive 42) packages/agents-mobile/src/screens/ShareSessionScreen.tsx:106— ShareSessionScreen.ShareSessionScreen has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 13 (21 pts), boolean chains 10, if/else 6 (7 pts), error handling 4 (nesting depth added 9). Of this number, 17 points are the body's own statements and 25 belong to 9 function items 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.
ShapeStream.#requestShape (cognitive 42) packages/typescript-client/src/client.ts:970— ShapeStream.#requestShape has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 8, 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.
useServerConnection.ServerConnectionProvider (cognitive 41) packages/agents-server-ui/src/hooks/useServerConnection.tsx:115— useServerConnection.ServerConnectionProvider has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (23 pts), ternaries 8 (15 pts), boolean chains 2, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 215, 136, 339, …). 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.
ShapeStream.#constructUrl (cognitive 41) packages/typescript-client/src/client.ts:1213— ShapeStream.#constructUrl has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 4, loops 1 (2 pts), ternaries 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.
setup-context.createSetupContext::ensureObservedHandle (cognitive 40) packages/agents-runtime/src/setup-context.ts:697— setup-context.createSetupContext::ensureObservedHandle has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 11 (24 pts), if/else 8 (14 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (setup-context.createSetupContext) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WakeRegistry.matchCondition (cognitive 39) packages/agents-server/src/wake-registry.ts:908— WakeRegistry.matchCondition has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, ternaries 2 (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.
ShapeStream.#start (cognitive 39) packages/typescript-client/src/client.ts:840— ShapeStream.#start has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (37 pts), boolean chains 1, error handling 1 (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.
preamble.parsePreamble (cognitive 38) packages/agents-runtime/src/skills/preamble.ts:10— preamble.parsePreamble has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 4 (10 pts), match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentResponse.AgentResponseLive (cognitive 38) packages/agents-server-ui/src/components/AgentResponse.tsx:464— AgentResponse.AgentResponseLive has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 23, if/else 10, ternaries 5. Of this number, 21 points are the body's own statements and 17 belong to 9 function items 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.
SplitMenu.SplitMenu (cognitive 35) packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:153— SplitMenu.SplitMenu has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 22, if/else 10, ternaries 3. Of this number, 20 points are the body's own statements and 15 belong to 7 function items 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.
SchemaForm.ObjectSchemaForm (cognitive 35) packages/agents-server-ui/src/components/SchemaForm.tsx:63— SchemaForm.ObjectSchemaForm has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, loops 3 (nesting depth added 12). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 103, 117, 82). 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.
registry.createRegistry (cognitive 34) packages/agents-mcp/src/registry.ts:163— registry.createRegistry has cognitive complexity 34 (threshold 15). Drivers by points: if/else 35 (46 pts), error handling 6 (11 pts), loops 4, boolean chains 3, ternaries 1 (nesting depth added 16). 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. This shape REPEATS in the file: one other method here (registry.createRegistry::buildTransport) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SchemaForm.SchemaField (cognitive 34) packages/agents-server-ui/src/components/SchemaForm.tsx:173— SchemaForm.SchemaField has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 8 (10 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 13). Of this number, 23 points are the body's own statements and 11 belong to 3 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.
SchemaValidator.findDisallowedKeywords (cognitive 34) packages/agents-server/src/electric-agents/schema-validator.ts:59— SchemaValidator.findDisallowedKeywords has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (8 pts), ternaries 1 (3 pts), boolean chains 2 (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.
fetch.createFetchWithBackoff.<returned closure> (cognitive 34) packages/typescript-client/src/fetch.ts:116— fetch.createFetchWithBackoff.<returned closure> has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 2 (9 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Materializer.apply_changes (cognitive 33) packages/sync-service/lib/electric/shapes/consumer/materializer.ex:536— Materializer.apply_changes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 6, match/switch 2 (6 pts) (nesting depth added 8). 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.
durable-streams-router.authorizeDurableStreamAccess (cognitive 33) packages/agents-server/src/routing/durable-streams-router.ts:643— durable-streams-router.authorizeDurableStreamAccess has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 2 (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.
BuiltinAgentsServer.start (cognitive 33) packages/agents/src/server.ts:184— BuiltinAgentsServer.start has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (22 pts), error handling 3 (5 pts), loops 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 12). Of this number, 22 points are the body's own statements and 11 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.
SidebarViewMenu.SidebarViewMenu (cognitive 32) packages/agents-server-ui/src/components/SidebarViewMenu.tsx:70— SidebarViewMenu.SidebarViewMenu has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, loops 5, ternaries 4 (5 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 132, 154, 175, …). 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.
GeneralPage.GeneralPage (cognitive 32) packages/agents-server-ui/src/components/settings/pages/GeneralPage.tsx:42— GeneralPage.GeneralPage has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 11, if/else 6, error handling 3 (nesting depth added 5). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 66, a function literal at line 77, handleClearAllLocalData, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
router.RootShell (cognitive 32) packages/agents-server-ui/src/router.tsx:136— router.RootShell has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 7, ternaries 4, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 289, 230, 240, …). 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.
knowledge-base.chunkMarkdown (cognitive 32) packages/agents/src/docs/knowledge-base.ts:155— knowledge-base.chunkMarkdown has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (7 pts), ternaries 1 (3 pts) (nesting depth added 19). Of this number, 31 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.
Sidebar.Sidebar (cognitive 31) packages/agents-server-ui/src/components/Sidebar.tsx:123— Sidebar.Sidebar has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 11, if/else 9, ternaries 7, loops 3, match/switch 1. Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 218, 245, 312, …). 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.
simulate.tickScene (cognitive 31) website/src/components/home/iso/simulate.ts:68— simulate.tickScene has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup-context.createSetupContext (cognitive 30) packages/agents-runtime/src/setup-context.ts:229— setup-context.createSetupContext has cognitive complexity 30 (threshold 15). Drivers by points: if/else 50 (83 pts), ternaries 14 (28 pts), boolean chains 15, loops 7 (8 pts), error handling 2 (4 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (setup-context.createSetupContext::ensureObservedHandle) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
registry.renderSkillList (cognitive 30) packages/agents-runtime/src/skills/registry.ts:154— registry.renderSkillList has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 5 (9 pts), loops 2 (3 pts), boolean chains 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.
AgentResponse.AgentResponse (cognitive 30) packages/agents-server-ui/src/components/AgentResponse.tsx:876— AgentResponse.AgentResponse has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 21, if/else 6, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 21 points are the body's own statements and 9 belong to 4 function items 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.
shape-stream-static-analysis.analyzeStateMachine (cognitive 30) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:332— shape-stream-static-analysis.analyzeStateMachine has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 16). Of this number, 19 points are the body's own statements and 11 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.
HomeMenu.HomeMenu (cognitive 29) packages/agents-mobile/src/components/HomeMenu.tsx:68— HomeMenu.HomeMenu has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 6, if/else 4 (5 pts), loops 2, error handling 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 11 belong 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.
SessionMenu.SessionMenu (cognitive 29) packages/agents-mobile/src/components/SessionMenu.tsx:122— SessionMenu.SessionMenu has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, ternaries 8 (12 pts), if/else 4 (nesting depth added 4). Of this number, 21 points are the body's own statements and 8 belong to 5 function items 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.
ApiKeysForm.ApiKeysForm (cognitive 29) packages/agents-server-ui/src/components/ApiKeysForm.tsx:72— ApiKeysForm.ApiKeysForm has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 22, if/else 6, ternaries 1. Of this number, 23 points are the body's own statements and 6 belong to 4 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.
StateExplorerPanel.StateExplorerPanel (cognitive 29) packages/agents-server-ui/src/components/stateExplorer/StateExplorerPanel.tsx:200— StateExplorerPanel.StateExplorerPanel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16, boolean chains 8, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 251, 317, 326, …). 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.
shape-stream-static-analysis.buildErrorPathPublishReport (cognitive 29) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:1044— shape-stream-static-analysis.buildErrorPathPublishReport has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, loops 1 (nesting depth added 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1055, 1075, 1053). 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.
SseSource::next (cognitive 28) packages/durable-streams-rust/src/handlers.rs:1877— SseSource::next has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (9 pts), boolean chains 3, 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.
lifecycle.startRuntime (cognitive 28) packages/agents-desktop/src/runtime/lifecycle.ts:188— lifecycle.startRuntime has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), error handling 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
webhook-sources.webhookSourceWakeInfoFromManifests (cognitive 28) packages/agents-runtime/src/webhook-sources.ts:346— webhook-sources.webhookSourceWakeInfoFromManifests has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stream-append.handleStreamAppend (cognitive 28) packages/agents-server/src/routing/stream-append.ts:85— stream-append.handleStreamAppend has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, loops 1 (3 pts), ternaries 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.
SessionListScreen.SessionListScreen (cognitive 27) packages/agents-mobile/src/screens/SessionListScreen.tsx:69— SessionListScreen.SessionListScreen has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 4, error handling 1, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 219, 320, 128, …). 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.
PaneFindBar.PaneFindBar (cognitive 27) packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:37— PaneFindBar.PaneFindBar has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 6 (8 pts), boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 99, 161, 74, …). 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.
WakeRegistry.evaluate (cognitive 27) packages/agents-server/src/wake-registry.ts:765— WakeRegistry.evaluate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 2 (nesting depth added 11). Of this number, 23 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.
runners-router.runnerHealth (cognitive 27) packages/agents-server/src/routing/runners-router.ts:441— runners-router.runnerHealth has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 5 (6 pts), boolean chains 4 (nesting depth added 4). Of this number, 25 points are the body's own statements and 2 belong to one function item 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, 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.
worker.parseWorkerArgs (cognitive 27) packages/agents/src/agents/worker.ts:51— worker.parseWorkerArgs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serve-markdown.default (cognitive 27) website/netlify/edge-functions/serve-markdown.ts:76— serve-markdown.default has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7 (nesting depth added 9). Of this number, 26 points are the body's own statements and 1 belongs 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.
render.collectScene (cognitive 27) website/src/components/home/iso/render.ts:92— render.collectScene has cognitive complexity 27 (threshold 15). Drivers by points: loops 12 (19 pts), if/else 8 (nesting depth added 7). 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.
schedules.getScheduleEntries (cognitive 26) packages/agents-runtime/src/tools/schedules.ts:115— schedules.getScheduleEntries has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 1 (2 pts), boolean chains 1, 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.
webhook-sources.getWebhookSourceSubscriptions (cognitive 26) packages/agents-runtime/src/tools/webhook-sources.ts:90— webhook-sources.getWebhookSourceSubscriptions has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 1 (2 pts), boolean chains 1, 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.
AgentResponse.MarkdownSegment (cognitive 26) packages/agents-server-ui/src/components/AgentResponse.tsx:74— AgentResponse.MarkdownSegment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 4, ternaries 2. Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 211, a function literal at line 108, a function literal at line 140, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
shape-stream-static-analysis.buildSharedFieldReport (cognitive 26) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:780— shape-stream-static-analysis.buildSharedFieldReport has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, loops 2 (3 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.
spawnArgs.buildInitialSpawnArgs (cognitive 25) packages/agents-mobile/src/lib/spawnArgs.ts:95— spawnArgs.buildInitialSpawnArgs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
OnboardingModal.ServerStep (cognitive 25) packages/agents-server-ui/src/components/OnboardingModal.tsx:968— OnboardingModal.ServerStep has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (finish, connectAvailableServer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
observe-ui.MessageInput (cognitive 25) packages/electric-ax/src/observe-ui.tsx:390— observe-ui.MessageInput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 429, 469). 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.
column-mapper.encodeWhereClause (cognitive 25) packages/typescript-client/src/column-mapper.ts:200— column-mapper.encodeWhereClause has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). Of this number, 21 points are the body's own statements and 4 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.
ShapeStream.#onInitialResponse (cognitive 25) packages/typescript-client/src/client.ts:1392— ShapeStream.#onInitialResponse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, ternaries 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.
meshOfStreams.sampleAlongRenderedPath (cognitive 25) website/src/components/brand-toys/meshOfStreams.ts:724— meshOfStreams.sampleAlongRenderedPath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
context-factory.getTriggerMessageText (cognitive 24) packages/agents-runtime/src/context-factory.ts:236— context-factory.getTriggerMessageText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, 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.
SidebarRow.SidebarRow (cognitive 24) packages/agents-server-ui/src/components/SidebarRow.tsx:106— SidebarRow.SidebarRow has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (10 pts), if/else 3 (nesting depth added 3). Of this number, 17 points are the body's own statements and 7 belong to 3 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.
OnboardingModal.OnboardingModal (cognitive 24) packages/agents-server-ui/src/components/OnboardingModal.tsx:148— OnboardingModal.OnboardingModal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, ternaries 4 (7 pts), boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 173, 214, 162, …). 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.
ServersPage.ServersPage (cognitive 24) packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:64— ServersPage.ServersPage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 4 (nesting depth added 5). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 8 function items inside it that branch (connectAvailableServer, a function literal at line 161, a function literal at line 154, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
server-utils.isSelfContainedWhereClause (cognitive 24) packages/agents-server/src/utils/server-utils.ts:294— server-utils.isSelfContainedWhereClause has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, 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.
cli.main (cognitive 24) packages/start/src/cli.ts:169— cli.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (5 pts), error handling 3 (4 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.
CloudAuth.signIn (cognitive 23) packages/agents-desktop/src/cloud/cloud-auth.ts:276— CloudAuth.signIn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 2 (5 pts), error handling 2, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (settle, tryIntercept, a function literal at line 329, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
EntityContextDrawer.EntityContextDrawer (cognitive 23) packages/agents-server-ui/src/components/EntityContextDrawer.tsx:106— EntityContextDrawer.EntityContextDrawer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, ternaries 3, loops 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 149, handleEntry, a function literal at line 170, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
EntityManager.waitForIdleSubtree (cognitive 23) packages/agents-server/src/entity-manager.ts:1443— EntityManager.waitForIdleSubtree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 1 (nesting depth added 9). Of this number, 21 points are the body's own statements and 2 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.
entity-stream-db.createEntityStreamDB (cognitive 22) packages/agents-runtime/src/entity-stream-db.ts:167— entity-stream-db.createEntityStreamDB has cognitive complexity 22 (threshold 15). Drivers by points: if/else 46 (62 pts), loops 13 (18 pts), ternaries 9 (18 pts), boolean chains 6 (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. This shape REPEATS in the file: one other method here (entity-stream-db.createEntityStreamDB::persistMutationsNow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DropOverlay.DropOverlay (cognitive 22) packages/agents-server-ui/src/components/workspace/DropOverlay.tsx:29— DropOverlay.DropOverlay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, ternaries 5 (6 pts), boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 88, 129, 64, …). 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.
CommandLinePage.CommandLinePage (cognitive 22) packages/agents-server-ui/src/components/settings/pages/CommandLinePage.tsx:31— CommandLinePage.CommandLinePage has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 7, error handling 2, if/else 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to 3 function items 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.
ChatView.GenericChatBody (cognitive 22) packages/agents-server-ui/src/components/views/ChatView.tsx:236— ChatView.GenericChatBody has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8, boolean chains 7, if/else 7. Of this number, 11 points are the body's own statements and 11 belong to 7 function literals inside it that branch. 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.
meshOfStreams.buildRenderedPathSegments (cognitive 22) website/src/components/brand-toys/meshOfStreams.ts:783— meshOfStreams.buildRenderedPathSegments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2, 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.
render.queueWallGrid (cognitive 22) website/src/components/home/iso/render.ts:637— render.queueWallGrid has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 660, 680). 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.
simulate.applyBeat (cognitive 22) website/src/components/home/iso/simulate.ts:331— simulate.applyBeat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
server-matching.findCloudServerForUrl (cognitive 21) packages/agents-desktop/src/cloud/server-matching.ts:13— server-matching.findCloudServerForUrl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (3 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.
spawnArgs.finalizeSpawnArgs (cognitive 21) packages/agents-mobile/src/lib/spawnArgs.ts:156— spawnArgs.finalizeSpawnArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, ternaries 2 (4 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.
SessionScreen.NativeEntityContextDrawer (cognitive 21) packages/agents-mobile/src/screens/SessionScreen.tsx:947— SessionScreen.NativeEntityContextDrawer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 980, selectEntry, a function literal at line 1038, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
entity-stream-db.createEntityStreamDB::persistMutationsNow (cognitive 21) packages/agents-runtime/src/entity-stream-db.ts:260— entity-stream-db.createEntityStreamDB::persistMutationsNow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (9 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. This shape REPEATS in the file: one other method here (entity-stream-db.createEntityStreamDB) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
use-chat.buildAgentSection (cognitive 21) packages/agents-runtime/src/use-chat.ts:276— use-chat.buildAgentSection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs 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.
goal-command.parseSet (cognitive 21) packages/agents-runtime/src/goal-command.ts:74— goal-command.parseSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, loops 1, ternaries 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.
ElectricAgentsProvider.createSpawnAction (cognitive 21) packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:522— ElectricAgentsProvider.createSpawnAction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 543). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
useWorkspacePersistence.useWorkspacePersistence (cognitive 21) packages/agents-server-ui/src/hooks/useWorkspacePersistence.ts:48— useWorkspacePersistence.useWorkspacePersistence has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), error handling 4, ternaries 2, boolean chains 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 85, 67, 152, …). 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.
shape-stream-static-analysis.buildTailPositionAwaitReport (cognitive 21) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:982— shape-stream-static-analysis.buildTailPositionAwaitReport has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 992). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TierTask::offload_pending (cognitive 20) packages/durable-streams-rust/src/tier.rs:784— TierTask::offload_pending has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
registry.createRegistry::buildTransport (cognitive 20) packages/agents-mcp/src/registry.ts:172— registry.createRegistry::buildTransport has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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. This shape REPEATS in the file: one other method here (registry.createRegistry) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
InlineEventCard.InlineEventCard (cognitive 20) packages/agents-server-ui/src/components/InlineEventCard.tsx:7— InlineEventCard.InlineEventCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 5 (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.
ToolCallView.ToolBody (cognitive 20) packages/agents-server-ui/src/components/ToolCallView.tsx:142— ToolCallView.ToolBody has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (7 pts), match/switch 1 (nesting depth added 3). 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.
GoalBanner.GoalBanner (cognitive 20) packages/agents-server-ui/src/components/GoalBanner.tsx:22— GoalBanner.GoalBanner has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 30, 24). 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.
StateTable.StateTable (cognitive 20) packages/agents-server-ui/src/components/stateExplorer/StateTable.tsx:47— StateTable.StateTable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 4). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 68, 96, 101, …). 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.
StateExplorerPanel.deriveSharedStateSources (cognitive 20) packages/agents-server-ui/src/components/stateExplorer/StateExplorerPanel.tsx:95— StateExplorerPanel.deriveSharedStateSources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, ternaries 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.
EntityManager.send (cognitive 20) packages/agents-server/src/entity-manager.ts:2362— EntityManager.send has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, error handling 1, ternaries 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.
EntityManager.extractRunResponse (cognitive 20) packages/agents-server/src/entity-manager.ts:3415— EntityManager.extractRunResponse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, ternaries 1 (2 pts), error handling 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.
entities-router.forkEntity (cognitive 20) REDACTED:1184— entities-router.forkEntity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, 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.
cli.parseArgs (cognitive 20) packages/start/src/cli.ts:16— cli.parseArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 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.
Connection.open_with_recovery (cognitive 19) packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/connection.ex:263— Connection.open_with_recovery has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 4 (9 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
servers.normalizeServer (cognitive 19) packages/agents-desktop/src/settings/servers.ts:9— servers.normalizeServer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 7, if/else 3, 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.
store.loadDesktopSettings (cognitive 19) packages/agents-desktop/src/settings/store.ts:134— store.loadDesktopSettings has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 4, error handling 1, 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.
SessionRow.SessionRow (cognitive 19) packages/agents-mobile/src/components/SessionRow.tsx:55— SessionRow.SessionRow has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 3 (nesting depth added 5). Of this number, 11 points are the body's own statements and 8 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.
entity-timeline.buildIncludesRuns (cognitive 19) packages/agents-runtime/src/entity-timeline.ts:801— entity-timeline.buildIncludesRuns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 1 belongs 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.
McpServerFormDialog.McpServerFormDialog (cognitive 19) packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:268— McpServerFormDialog.McpServerFormDialog has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 6, if/else 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSubmit, a function literal at line 290, a function literal at line 297, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ElectricAgentsTenantRuntime.rehydrateCronSchedules (cognitive 19) packages/agents-server/src/runtime.ts:120— ElectricAgentsTenantRuntime.rehydrateCronSchedules has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (7 pts), error handling 3 (6 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EntityManager.computeEffectiveSubtree (cognitive 19) packages/agents-server/src/entity-manager.ts:1652— EntityManager.computeEffectiveSubtree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (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.
EntityManager.validateSendRequest (cognitive 19) packages/agents-server/src/entity-manager.ts:3940— EntityManager.validateSendRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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.
shape-stream-static-analysis.build409CacheBusterReport (cognitive 19) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:908— shape-stream-static-analysis.build409CacheBusterReport has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 916, 926, 941). 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.
parser.pgArrayParser::loop (cognitive 19) packages/typescript-client/src/parser.ts:61— parser.pgArrayParser::loop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 1 (4 pts), boolean chains 3, 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.
ShapeStream.#onMessages (cognitive 19) packages/typescript-client/src/client.ts:1522— ShapeStream.#onMessages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1568). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ShapeStream.#fetchSnapshotWithRetry (cognitive 19) packages/typescript-client/src/client.ts:2257— ShapeStream.#fetchSnapshotWithRetry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, error handling 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.
render.drawActorSprite (cognitive 19) website/src/components/home/iso/render.ts:1445— render.drawActorSprite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagTracker.generate_synthetic_deletes (cognitive 18) packages/elixir-client/lib/electric/client/tag_tracker.ex:155— TagTracker.generate_synthetic_deletes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (4 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ServeShapePlug.open_telemetry_attrs (cognitive 18) packages/sync-service/lib/electric/plug/serve_shape_plug.ex:560— ServeShapePlug.open_telemetry_attrs has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. 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.
Shard::replay_from_checkpoint (cognitive 18) packages/durable-streams-rust/src/wal/shard.rs:1203— Shard::replay_from_checkpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 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.
controller.createCliController.getStatus (cognitive 18) packages/agents-desktop/src/cli/controller.ts:17— controller.createCliController.getStatus has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4, 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.
store.validateMcpServerConfig (cognitive 18) packages/agents-desktop/src/settings/store.ts:268— store.validateMcpServerConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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.
auth-injection.mergeUndiciHeaders (cognitive 18) packages/agents-desktop/src/cloud/auth-injection.ts:72— auth-injection.mergeUndiciHeaders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 2 belong 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.
AccountScreen.AccountScreen (cognitive 18) packages/agents-mobile/src/screens/AccountScreen.tsx:24— AccountScreen.AccountScreen has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 2 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NewSessionScreen.NewSessionScreen::start (cognitive 18) packages/agents-mobile/src/screens/NewSessionScreen.tsx:243— NewSessionScreen.NewSessionScreen::start has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 4, if/else 3, 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.
pi-adapter.toAgentHistory (cognitive 18) packages/agents-runtime/src/pi-adapter.ts:172— pi-adapter.toAgentHistory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 8). Of this number, 17 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.
context-factory.createHandlerContext.selectHydratableImageAttachmentIds (cognitive 18) packages/agents-runtime/src/context-factory.ts:610— context-factory.createHandlerContext.selectHydratableImageAttachmentIds has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseSplit (cognitive 18) packages/agents-server-ui/src/lib/workspace/layoutCodec.ts:148— Parser.parseSplit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (6 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.
PaneFindBar.renderAdapterHighlights (cognitive 18) packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:298— PaneFindBar.renderAdapterHighlights has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 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.
OnboardingModal.CodexProviderItem (cognitive 18) packages/agents-server-ui/src/components/OnboardingModal.tsx:696— OnboardingModal.CodexProviderItem has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 2, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (useSource, signIn, a function literal at line 706, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ServersPage.ServerRow (cognitive 18) packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:250— ServersPage.ServerRow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, ternaries 3 (4 pts) (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.
NewSessionView.CodexDetectedPrompt (cognitive 18) packages/agents-server-ui/src/components/views/NewSessionView.tsx:675— NewSessionView.CodexDetectedPrompt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7, ternaries 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 8 belong to 5 function items 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.
pg-sync-bridge-manager.buildShapeProbeUrl (cognitive 18) packages/agents-server/src/pg-sync-bridge-manager.ts:138— pg-sync-bridge-manager.buildShapeProbeUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 2, 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.
Scheduler.getNextFireAt (cognitive 18) packages/agents-server/src/scheduler.ts:733— Scheduler.getNextFireAt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 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.
EntityManager.amendSchemas (cognitive 18) packages/agents-server/src/entity-manager.ts:3765— EntityManager.amendSchemas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 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.
MultiShapeStream.#start (cognitive 18) packages/experimental/src/multi-shape-stream.ts:167— MultiShapeStream.#start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 9). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 176, 180, 196). 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.
tray.updateTray (cognitive 17) packages/agents-desktop/src/ui/tray.ts:65— tray.updateTray has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 5, boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 107, 167, 153, …). 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.
ServerSetupScreen.ServerSetupScreen (cognitive 17) packages/agents-mobile/src/screens/ServerSetupScreen.tsx:29— ServerSetupScreen.ServerSetupScreen has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (5 pts), if/else 3, error handling 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 7 belong to 3 function items 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.
goal-command.tokenize (cognitive 17) packages/agents-runtime/src/goal-command.ts:149— goal-command.tokenize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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.
timeline-context.reorderInterruptedRuns (cognitive 17) packages/agents-runtime/src/timeline-context.ts:306— timeline-context.reorderInterruptedRuns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 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.
ServerPicker.ServerPicker (cognitive 17) packages/agents-server-ui/src/components/ServerPicker.tsx:36— ServerPicker.ServerPicker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (connectAvailableServer, a function literal at line 53, a function literal at line 145, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
CompactionIndicator.CompactionIndicator (cognitive 17) packages/agents-server-ui/src/components/CompactionIndicator.tsx:28— CompactionIndicator.CompactionIndicator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5, boolean chains 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 39, 57, 32). 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.
EntityContextDrawer.PendingInboxSection (cognitive 17) packages/agents-server-ui/src/components/EntityContextDrawer.tsx:286— EntityContextDrawer.PendingInboxSection has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 5, if/else 4. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (reorderMessage, getDropPlacement, a function literal at line 383, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
EntityTimeline.ManifestTimelineRow (cognitive 17) packages/agents-server-ui/src/components/EntityTimeline.tsx:842— EntityTimeline.ManifestTimelineRow has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 6, if/else 3 (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
EntityTimeline.TimelineRow (cognitive 17) packages/agents-server-ui/src/components/EntityTimeline.tsx:1223— EntityTimeline.TimelineRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (6 pts), boolean chains 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.
manifest-side-effects.buildManifestWakeRegistration (cognitive 17) packages/agents-server/src/manifest-side-effects.ts:133— manifest-side-effects.buildManifestWakeRegistration has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 6, boolean chains 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
runners-router.sanitizeRunnerDiagnostics (cognitive 17) packages/agents-server/src/routing/runners-router.ts:158— runners-router.sanitizeRunnerDiagnostics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2, 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.
shape-stream-static-analysis.buildClassInfo (cognitive 17) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:692— shape-stream-static-analysis.buildClassInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 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.
TagTracker.update_tag_index (cognitive 16) packages/elixir-client/lib/electric/client/tag_tracker.ex:49— TagTracker.update_tag_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Api.do_serve_shape_log (cognitive 16) packages/sync-service/lib/electric/shapes/api.ex:701— Api.do_serve_shape_log has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Shape.make_new (cognitive 16) packages/sync-service/lib/electric/shapes/shape.ex:230— Shape.make_new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 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.
CloudAgentServers.openStream (cognitive 16) packages/agents-desktop/src/cloud/cloud-agent-servers.ts:337— CloudAgentServers.openStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 352, 368). 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.
PrimaryButton.PrimaryButton (cognitive 16) packages/agents-mobile/src/components/PrimaryButton.tsx:17— PrimaryButton.PrimaryButton has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 4 (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 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.
HomeMenu.ServerListPage (cognitive 16) packages/agents-mobile/src/components/HomeMenu.tsx:460— HomeMenu.ServerListPage has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 4, if/else 3, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (selectServer, a function literal at line 533). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SessionScreen.createManifestEntry (cognitive 16) packages/agents-mobile/src/screens/SessionScreen.tsx:1389— SessionScreen.createManifestEntry has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (6 pts), match/switch 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.
timeline-context.defaultProjection (cognitive 16) packages/agents-runtime/src/timeline-context.ts:201— timeline-context.defaultProjection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
context-factory.createHandlerContext.assertValidUseContextConfig (cognitive 16) packages/agents-runtime/src/context-factory.ts:736— context-factory.createHandlerContext.assertValidUseContextConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 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.
tools.parseArgs (cognitive 16) REDACTED:171— tools.parseArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 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.
read-file.formatReadOutput (cognitive 16) packages/agents-runtime/src/tools/read-file.ts:26— read-file.formatReadOutput has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (3 pts), boolean chains 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, 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.
LocalRuntimePage.runnerHealth (cognitive 16) packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:60— LocalRuntimePage.runnerHealth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong 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.
pg-sync-bridge-manager.buildElectricShapeParams (cognitive 16) packages/agents-server/src/pg-sync-bridge-manager.ts:80— pg-sync-bridge-manager.buildElectricShapeParams has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ElectricAgentsTenantRuntime.syncManifestWakes (cognitive 16) packages/agents-server/src/runtime.ts:228— ElectricAgentsTenantRuntime.syncManifestWakes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), 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.
EntityManager.resolveForkPointerTarget (cognitive 16) packages/agents-server/src/entity-manager.ts:1555— EntityManager.resolveForkPointerTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (4 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.
EntityManager.resolveLatestCompletedRunPointer (cognitive 16) packages/agents-server/src/entity-manager.ts:1605— EntityManager.resolveLatestCompletedRunPointer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 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.
horton.buildFallbackTitle (cognitive 16) packages/agents/src/agents/horton.ts:112— horton.buildFallbackTitle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1, 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.
prompt-api-key.ensureAnthropicApiKey (cognitive 16) REDACTED:106— prompt-api-key.ensureAnthropicApiKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 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.
meshOfStreams.segmentsIntersectOrOverlap (cognitive 16) website/src/components/brand-toys/meshOfStreams.ts:438— meshOfStreams.segmentsIntersectOrOverlap has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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.
ambient.buildAmbientBeats (cognitive 16) website/src/components/home/iso/scripts/ambient.ts:225— ambient.buildAmbientBeats has cognitive complexity 16 (threshold 15). Drivers by points: loops 9 (12 pts), if/else 1 (4 pts) (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) packages/durable-streams-rust/src/wal/recovery.rs:303— packages/durable-streams-rust/src/wal/recovery.rs:303-328 | packages/durable-streams-rust/src/wal/segment.rs:180-208 — These two members are one piece of code written twice and then edited apart: 26 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) packages/sync-service/lib/electric/admission_control.ex:77— packages/sync-service/lib/electric/admission_control.ex:77-114 | packages/sync-service/lib/electric/admission_control.ex:155-184 — 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 copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) packages/sync-service/lib/electric/postgres/snapshot_query.ex:175— packages/sync-service/lib/electric/postgres/snapshot_query.ex:175-202 | packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex:286-308 — These two members are one piece of code written twice and then edited apart: 23 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) packages/sync-service/lib/electric/log_items.ex:37— packages/sync-service/lib/electric/log_items.ex:37-58 | packages/sync-service/lib/electric/log_items.ex:62-83 | packages/sync-service/lib/electric/log_items.ex:88-110 — 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 copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:290— packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:290-301 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:303-311 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:313-321 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) packages/sync-service/lib/electric/connection/manager.ex:1012— packages/sync-service/lib/electric/connection/manager.ex:1012-1031 | packages/sync-service/lib/electric/connection/manager.ex:1035-1056 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) packages/sync-service/lib/electric/shapes/consumer/subqueries/index_changes.ex:72— packages/sync-service/lib/electric/shapes/consumer/subqueries/index_changes.ex:72-96 | packages/sync-service/lib/electric/shapes/consumer/subqueries/index_changes.ex:108-134 — 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 copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:83— packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:83-88 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:109-114 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:119-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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 (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) packages/sync-service/lib/electric/config.ex:501— packages/sync-service/lib/electric/config.ex:501-508 | packages/sync-service/lib/electric/config.ex:560-567 — These two members are one piece of code written twice and then edited apart: 8 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, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) packages/sync-service/lib/electric/db_connection_error.ex:576— packages/sync-service/lib/electric/db_connection_error.ex:576-589 | packages/sync-service/lib/electric/db_connection_error.ex:608-621 | packages/sync-service/lib/electric/db_connection_error.ex:661-674 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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 (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) packages/sync-service/lib/electric/connection/manager/pool.ex:68— packages/sync-service/lib/electric/connection/manager/pool.ex:68-70 | packages/sync-service/lib/electric/shape_cache/expiry_manager.ex:21-23 — 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.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) packages/sync-service/lib/electric/postgres/lsn.ex:112— packages/sync-service/lib/electric/postgres/lsn.ex:112-112 | packages/sync-service/lib/electric/shape_cache/pure_file_storage/log_file.ex:341-342 — These two members are one piece of code written twice and then edited apart: 1 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 (20–25 lines × 2) packages/sync-service/lib/electric/shapes/consumer.ex:1179— packages/sync-service/lib/electric/shapes/consumer.ex:1179-1203 | packages/sync-service/lib/electric/shapes/consumer/effects.ex:327-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) packages/sync-service/lib/electric/replication/eval/parser.ex:1556— packages/sync-service/lib/electric/replication/eval/parser.ex:1556-1576 | packages/sync-service/lib/electric/replication/eval/runner.ex:143-163 — 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 `packages/sync-service/lib/electric/replication/eval/parser.ex:1556` 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 (12 lines × 2) packages/sync-service/lib/electric/log_items.ex:47— packages/sync-service/lib/electric/log_items.ex:47-58 | packages/sync-service/lib/electric/log_items.ex:72-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/sync-service/lib/electric/log_items.ex:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) packages/electric-telemetry/lib/electric/telemetry/opts.ex:66— packages/electric-telemetry/lib/electric/telemetry/opts.ex:66-75 | packages/electric-telemetry/lib/electric/telemetry/opts.ex:81-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/electric-telemetry/lib/electric/telemetry/opts.ex:81` 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 (7–8 lines × 3) packages/sync-service/lib/electric/log_items.ex:45— packages/sync-service/lib/electric/log_items.ex:45-52 | packages/sync-service/lib/electric/log_items.ex:70-77 | packages/sync-service/lib/electric/log_items.ex:95-101 — 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 `packages/sync-service/lib/electric/log_items.ex:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/sync-service/lib/electric/log_items.ex:101` calls `put_if_true` and `packages/sync-service/lib/electric/log_items.ex:52` 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 (17–20 lines × 2) packages/durable-streams-rust/src/wal/recovery.rs:306— packages/durable-streams-rust/src/wal/recovery.rs:306-322 | packages/durable-streams-rust/src/wal/segment.rs:182-201 — 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 `packages/durable-streams-rust/src/wal/recovery.rs:306` 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. 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 (11–17 lines × 2) packages/durable-streams-rust/src/handlers.rs:602— packages/durable-streams-rust/src/handlers.rs:602-612 | packages/durable-streams-rust/src/handlers.rs:1173-1189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/durable-streams-rust/src/handlers.rs:602` 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 (15 lines × 2) packages/durable-streams-rust/src/wal/shard.rs:1133— packages/durable-streams-rust/src/wal/shard.rs:1133-1147 | packages/durable-streams-rust/src/wal/shard.rs:1211-1225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) packages/durable-streams-rust/src/sse_reactor.rs:441— packages/durable-streams-rust/src/sse_reactor.rs:441-449 | packages/durable-streams-rust/src/sse_reactor.rs:565-573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 2) packages/durable-streams-rust/src/blobstore.rs:86— packages/durable-streams-rust/src/blobstore.rs:86-93 | packages/durable-streams-rust/src/tier.rs:577-583 — 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. 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) packages/durable-streams-rust/src/engine_raw.rs:443— packages/durable-streams-rust/src/engine_raw.rs:443-450 | packages/durable-streams-rust/src/engine_raw.rs:504-511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/durable-streams-rust/src/engine_raw.rs:443` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) packages/durable-streams-rust/src/wal/shard.rs:1275— packages/durable-streams-rust/src/wal/shard.rs:1275-1279 | packages/durable-streams-rust/src/wal/shard.rs:1296-1300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/durable-streams-rust/src/wal/shard.rs:1275` 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.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) examples/burn/lib/burn/threads/event.ex:129— examples/burn/lib/burn/threads/event.ex:129-144 | examples/burn/lib/burn/tool_call.ex:49-66 — 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.
Duplicated block (18 lines × 3) examples/burn/lib/burn/release.ex:9— examples/burn/lib/burn/release.ex:9-49 | examples/gatekeeper-auth/api/lib/api/release.ex:9-26 | examples/phoenix-liveview/lib/electric_phoenix_example/release.ex:9-26 — before extracting anything, compare `examples/burn/lib/burn/release.ex` and `examples/gatekeeper-auth/api/lib/api/release.ex` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) examples/burn/lib/burn/agents/frankie.ex:67— examples/burn/lib/burn/agents/frankie.ex:67-72 | examples/burn/lib/burn/agents/jerry.ex:56-61 | examples/burn/lib/burn/agents/sarah.ex:101-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×1
Markup wires an event to an empty handler packages/agents-mobile/src/components/BottomSheet.tsx:162— `onPress` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to packages/agents-server-ui/src/components/EntityTimeline.tsx:1129— The guard above `return FileJson;` also returns `FileJson`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Outbound HTTP without resilience packages/sync-service/lib/electric/telemetry/sentry_req_http_client.ex:12— `Req.post(` 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.
Duplication concentrated across 13 sibling directories (77 clone groups) REDACTED:9— 77 duplicated blocks under packages/ have copies in at least two of the sibling directories agents, agents-desktop, agents-mcp, agents-mobile, agents-runtime, agents-server (+7 more sibling(s) not listed) — 60 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 77 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 77 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 77 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 3 sibling directories (5 clone groups) packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32— 5 duplicated blocks under packages/agents-server-ui/src/components/ have copies in at least two of the sibling directories settings, views, workspace — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (189 matched lines × 2 locations) · ×1
Duplicated block with local edits (189 matched lines × 2 locations) packages/agents-runtime/src/tools/schedules.ts:49— packages/agents-runtime/src/tools/schedules.ts:49 · packages/agents-runtime/src/tools/webhook-sources.ts:20 — the two spans are one implementation copied and then locally edited — 927 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (117 matched lines × 2 locations) · ×1
Duplicated block with local edits (117 matched lines × 2 locations) REDACTED:9— REDACTED:9 · packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:13 — the two spans are one implementation copied and then locally edited — 936 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (104 matched lines × 2 locations) · ×1
Duplicated block with local edits (104 matched lines × 2 locations) packages/agents-server/src/entity-bridge-manager.ts:514— packages/agents-server/src/entity-bridge-manager.ts:514 · packages/agents-server/src/entity-projector.ts:308 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (97 matched lines × 2 locations) · ×1
Duplicated block with local edits (97 matched lines × 2 locations) packages/agents-server/src/entrypoint-lib.ts:9— packages/agents-server/src/entrypoint-lib.ts:9 · packages/agents/src/entrypoint-lib.ts:5 — the two spans are one implementation copied and then locally edited — 425 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (87 matched lines × 2 locations) · ×1
Duplicated block with local edits (87 matched lines × 2 locations) packages/agents-server/src/entity-bridge-manager.ts:55— packages/agents-server/src/entity-bridge-manager.ts:55 · packages/agents-server/src/entity-projector.ts:44 — the two spans are one implementation copied and then locally edited — 458 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (84 matched lines × 2 locations) · ×1
Duplicated block with local edits (84 matched lines × 2 locations) packages/agents-mobile/src/screens/NewSessionScreen.tsx:498— packages/agents-mobile/src/screens/NewSessionScreen.tsx:498 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:214 — the two spans are one implementation copied and then locally edited — 354 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (82 matched lines × 2 locations) · ×1
Duplicated block with local edits (82 matched lines × 2 locations) packages/agents-server-ui/src/components/AgentResponse.tsx:644— packages/agents-server-ui/src/components/AgentResponse.tsx:644 · packages/agents-server-ui/src/components/AgentResponse.tsx:900 — the two spans are one implementation copied and then locally edited — 489 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.
R10 · Code Duplication· Duplicated block with local edits (81 matched lines × 2 locations) · ×1
Duplicated block with local edits (81 matched lines × 2 locations) packages/agents-mobile/src/screens/SessionScreen.tsx:604— packages/agents-mobile/src/screens/SessionScreen.tsx:604 · packages/agents-server-ui/src/components/MessageInput.tsx:181 — the two spans are one implementation copied and then locally edited — 416 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (73 matched lines × 2 locations) · ×1
Duplicated block with local edits (73 matched lines × 2 locations) packages/agents-mobile/src/screens/OnboardingScreen.tsx:49— packages/agents-mobile/src/screens/OnboardingScreen.tsx:49 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:40 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (72 identical lines × 2 files) scripts/ci/desktop-affected.mjs:3— scripts/ci/desktop-affected.mjs:3 · scripts/ci/mobile-affected.mjs:3 — these 2 files are line-for-line copies of one another — 72 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (65 identical lines × 2 files) packages/agents-server/src/utils/log.ts:1— packages/agents-server/src/utils/log.ts:1 · packages/agents/src/log.ts:1 — these 2 files are line-for-line copies of one another — 65 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (64 matched lines × 2 locations) · ×1
Duplicated block with local edits (64 matched lines × 2 locations) packages/agents-server-ui/src/ui/Combobox.tsx:89— packages/agents-server-ui/src/ui/Combobox.tsx:89 · packages/agents-server-ui/src/ui/Menu.tsx:43 — the two spans are one implementation copied and then locally edited — 311 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (58 matched lines × 2 locations) · ×1
Duplicated block with local edits (58 matched lines × 2 locations) packages/agents-mobile/src/lib/sessionBuckets.ts:28— packages/agents-mobile/src/lib/sessionBuckets.ts:28 · packages/agents-server-ui/src/lib/sessionGroups.ts:44 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (56 lines × 2 locations) packages/agents-server/src/entity-manager.ts:2279— packages/agents-server/src/entity-manager.ts:2279 · packages/agents-server/src/runtime.ts:452 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication· Duplicated block with local edits (56 matched lines × 2 locations) · ×1
Duplicated block with local edits (56 matched lines × 2 locations) packages/agents-server/src/scheduler.ts:98— packages/agents-server/src/scheduler.ts:98 · packages/agents-server/src/scheduler.ts:331 — the two spans are one implementation copied and then locally edited — 223 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 (51 lines × 2 locations) packages/experimental/tsup.config.ts:4— packages/experimental/tsup.config.ts:4 · packages/react-hooks/tsup.config.ts:4 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication· Duplicated block with local edits (48 matched lines × 2 locations) · ×1
Duplicated block with local edits (48 matched lines × 2 locations) packages/agents-server/src/entrypoint-lib.ts:227— packages/agents-server/src/entrypoint-lib.ts:227 · packages/agents/src/entrypoint-lib.ts:164 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (47 lines × 2 locations) packages/typescript-client/tsup.config.ts:13— packages/typescript-client/tsup.config.ts:13 · packages/y-electric/tsup.config.ts:10 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×1
Duplicated block with local edits (46 matched lines × 2 locations) packages/agents-mobile/src/lib/useEntityPermissions.ts:43— packages/agents-mobile/src/lib/useEntityPermissions.ts:43 · packages/agents-server-ui/src/hooks/useEntityPermission.ts:48 — the two spans are one implementation copied and then locally edited — 310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (45 lines × 2 locations) packages/agents-mobile/src/screens/OnboardingScreen.tsx:650— packages/agents-mobile/src/screens/OnboardingScreen.tsx:650 · packages/agents-mobile/src/screens/ServerSetupScreen.tsx:264 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
R10 · Code Duplication· Duplicated block with local edits (43 matched lines × 2 locations) · ×1
Duplicated block with local edits (43 matched lines × 2 locations) packages/agents-mobile/src/lib/pinnedEntities.ts:12— packages/agents-mobile/src/lib/pinnedEntities.ts:12 · packages/agents-mobile/src/lib/savedServers.ts:32 — the two spans are one implementation copied and then locally edited — 246 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (41 lines × 2 locations) packages/agents-server-ui/src/components/ServerPicker.tsx:69— packages/agents-server-ui/src/components/ServerPicker.tsx:69 · packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:78 — the 2 copies are spread across 2 files, 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 (40 lines × 2 locations) packages/agents-desktop/src/cloud/cloud-auth.ts:132— packages/agents-desktop/src/cloud/cloud-auth.ts:132 · packages/agents-mobile/src/lib/cloudAuth.ts:181 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (37 matched lines × 2 locations) · ×1
Duplicated block with local edits (37 matched lines × 2 locations) packages/agents-server-ui/src/ui/Code.tsx:20— packages/agents-server-ui/src/ui/Code.tsx:20 · packages/agents-server-ui/src/ui/Text.tsx:27 — the 2 copies are spread across 2 files, 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 (36 lines × 2 locations) REDACTED:390— REDACTED:390 · REDACTED:429 — 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 (31 lines × 2 locations) packages/agents-runtime/src/setup-context.ts:1044— packages/agents-runtime/src/setup-context.ts:1044 · packages/agents-runtime/src/setup-context.ts:1199 — 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 (anonymous) (cyclomatic 178, cognitive 267) packages/typescript-client/src/client.ts:706— (anonymous) has cyclomatic complexity 178 and cognitive complexity 267; 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 processWake (cyclomatic 123, cognitive 207) packages/agents-runtime/src/process-wake.ts:434— processWake has cyclomatic complexity 123 and cognitive complexity 207; 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 executeStep (cyclomatic 101, cognitive 118) packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:1083— executeStep has cyclomatic complexity 101 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 66, cognitive 115) packages/agents-runtime/src/pi-adapter.ts:385— (anonymous) has cyclomatic complexity 66 and cognitive complexity 115; 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 MessageInput (cyclomatic 55, cognitive 44) packages/agents-server-ui/src/components/MessageInput.tsx:53— MessageInput has cyclomatic complexity 55 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 46, cognitive 61) packages/y-electric/src/y-electric.ts:74— (anonymous) has cyclomatic complexity 46 and cognitive complexity 61; 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 spawnInner (cyclomatic 45, cognitive 57) packages/agents-server/src/entity-manager.ts:636— spawnInner has cyclomatic complexity 45 and cognitive complexity 57; 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 wakeCallback (cyclomatic 42, cognitive 54) packages/agents-server/src/routing/internal-router.ts:669— wakeCallback has cyclomatic complexity 42 and cognitive complexity 54; 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 LocalRuntimePage (cyclomatic 40, cognitive 36) packages/agents-server-ui/src/components/settings/pages/LocalRuntimePage.tsx:151— LocalRuntimePage has cyclomatic complexity 40 and cognitive complexity 36; 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 forkSubtreeInner (cyclomatic 39, cognitive 54) packages/agents-server/src/entity-manager.ts:962— forkSubtreeInner has cyclomatic complexity 39 and cognitive complexity 54; 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 startRuntime (cyclomatic 39, cognitive 46) packages/agents-desktop/src/runtime/lifecycle.ts:188— startRuntime has cyclomatic complexity 39 and cognitive complexity 46; 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 checkStateProtocolInvariants (cyclomatic 38, cognitive 62) packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:2387— checkStateProtocolInvariants has cyclomatic complexity 38 and cognitive complexity 62; 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 NativeMessageComposer (cyclomatic 38, cognitive 29) packages/agents-mobile/src/screens/SessionScreen.tsx:495— NativeMessageComposer has cyclomatic complexity 38 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 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 ServerEntry (cyclomatic 37, cognitive 33) packages/agents-server-ui/src/components/settings/pages/McpServersPage.tsx:154— ServerEntry has cyclomatic complexity 37 and cognitive complexity 33; 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 SplitMenu (cyclomatic 36, cognitive 23) packages/agents-server-ui/src/components/workspace/SplitMenu.tsx:153— SplitMenu has cyclomatic complexity 36 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 assembleContext (cyclomatic 35, cognitive 63) packages/agents-runtime/src/context-assembly.ts:213— assembleContext has cyclomatic complexity 35 and cognitive complexity 63; 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 CredentialsPage (cyclomatic 34, cognitive 23) packages/agents-server-ui/src/components/settings/pages/CredentialsPage.tsx:32— CredentialsPage has cyclomatic complexity 34 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 subscriptionWebhook (cyclomatic 33, cognitive 50) packages/agents-server/src/routing/internal-router.ts:427— subscriptionWebhook has cyclomatic complexity 33 and cognitive complexity 50; 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 remapManifestEntry (cyclomatic 32, cognitive 52) packages/agents-server/src/entity-manager.ts:2076— remapManifestEntry has cyclomatic complexity 32 and cognitive complexity 52; 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 matchCondition (cyclomatic 31, cognitive 39) packages/agents-server/src/wake-registry.ts:908— matchCondition has cyclomatic complexity 31 and cognitive complexity 39; 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 ApiKeysForm (cyclomatic 31, cognitive 27) packages/agents-server-ui/src/components/ApiKeysForm.tsx:72— ApiKeysForm has cyclomatic complexity 31 and cognitive complexity 27; 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 SessionMenu (cyclomatic 31, cognitive 26) packages/agents-mobile/src/components/SessionMenu.tsx:122— SessionMenu has cyclomatic complexity 31 and cognitive complexity 26; 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 extractManifestSourceUrl (cyclomatic 30, cognitive 60) packages/agents-server/src/manifest-side-effects.ts:13— extractManifestSourceUrl has cyclomatic complexity 30 and cognitive complexity 60; 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 AgentResponseLive (cyclomatic 30, cognitive 24) packages/agents-server-ui/src/components/AgentResponse.tsx:464— AgentResponseLive 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 (anonymous) (cyclomatic 29, cognitive 40) packages/agents-runtime/src/process-wake.ts:1769— (anonymous) has cyclomatic complexity 29 and cognitive complexity 40; 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 buildElectricProxyTarget (cyclomatic 29, cognitive 29) packages/agents-server/src/utils/server-utils.ts:112— buildElectricProxyTarget has cyclomatic complexity 29 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 AgentResponse (cyclomatic 29, cognitive 23) packages/agents-server-ui/src/components/AgentResponse.tsx:876— AgentResponse has cyclomatic complexity 29 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 28, cognitive 38) REDACTED:752— handleKeyDown has cyclomatic complexity 28 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DefaultAgentComposer (cyclomatic 27, cognitive 23) packages/agents-server-ui/src/components/views/NewSessionView.tsx:887— DefaultAgentComposer has cyclomatic complexity 27 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 formatAnalysisResult (cyclomatic 26, cognitive 53) packages/typescript-client/bin/lib/shape-stream-static-analysis.mjs:518— formatAnalysisResult has cyclomatic complexity 26 and cognitive complexity 53; 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 buildConfig (cyclomatic 26, cognitive 49) packages/agents-server-ui/src/components/settings/pages/McpServerFormDialog.tsx:141— buildConfig has cyclomatic complexity 26 and cognitive complexity 49; 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 assistantHandler (cyclomatic 26, cognitive 29) packages/agents/src/agents/horton.ts:645— assistantHandler has cyclomatic complexity 26 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 ToolBody (cyclomatic 26, cognitive 24) packages/agents-server-ui/src/components/ToolCallView.tsx:142— ToolBody has cyclomatic complexity 26 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 loadDesktopSettings (cyclomatic 26, cognitive 20) packages/agents-desktop/src/settings/store.ts:134— loadDesktopSettings has cyclomatic complexity 26 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 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 ServerRow (cyclomatic 26, cognitive 19) packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:250— ServerRow has cyclomatic complexity 26 and cognitive complexity 19; 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 parseConfig (cyclomatic 25, cognitive 45) packages/agents-mcp/src/config/loader.ts:22— parseConfig has cyclomatic complexity 25 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 runnerHealth (cyclomatic 25, cognitive 29) packages/agents-server/src/routing/runners-router.ts:441— runnerHealth has cyclomatic complexity 25 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 dockerSandbox (cyclomatic 24, cognitive 24) packages/agents-runtime/src/sandbox/docker.ts:329— dockerSandbox 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 startStandaloneAgentsRuntime (cyclomatic 24, cognitive 23) packages/agents-server/src/standalone-runtime.ts:61— startStandaloneAgentsRuntime has cyclomatic complexity 24 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 NewSessionScreen (cyclomatic 24, cognitive 19) packages/agents-mobile/src/screens/NewSessionScreen.tsx:66— NewSessionScreen has cyclomatic complexity 24 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· packages/agents-server/src/entity-manager.ts · ×1
packages/agents-server/src/entity-manager.ts: 3777 lines of code packages/agents-server/src/entity-manager.ts:1— packages/agents-server/src/entity-manager.ts has 3777 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-conformance-tests/src/electric-agents-tests.ts · ×1
packages/agents-server-conformance-tests/src/electric-agents-tests.ts: 3157 lines of code packages/agents-server-conformance-tests/src/electric-agents-tests.ts:1— packages/agents-server-conformance-tests/src/electric-agents-tests.ts has 3157 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/process-wake.ts · ×1
packages/agents-runtime/src/process-wake.ts: 2503 lines of code packages/agents-runtime/src/process-wake.ts:1— packages/agents-runtime/src/process-wake.ts has 2503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/typescript-client/src/client.ts · ×1
packages/typescript-client/src/client.ts: 2319 lines of code packages/typescript-client/src/client.ts:1— packages/typescript-client/src/client.ts has 2319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-conformance-tests/src/electric-agents-dsl.ts · ×1
packages/agents-server-conformance-tests/src/electric-agents-dsl.ts: 2297 lines of code packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:1— packages/agents-server-conformance-tests/src/electric-agents-dsl.ts has 2297 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/EntityTimeline.tsx · ×1
packages/agents-server-ui/src/components/EntityTimeline.tsx: 2090 lines of code packages/agents-server-ui/src/components/EntityTimeline.tsx:1— packages/agents-server-ui/src/components/EntityTimeline.tsx has 2090 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/entity-registry.ts · ×1
packages/agents-server/src/entity-registry.ts: 2043 lines of code packages/agents-server/src/entity-registry.ts:1— packages/agents-server/src/entity-registry.ts has 2043 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/entity-timeline.ts · ×1
packages/agents-runtime/src/entity-timeline.ts: 1821 lines of code packages/agents-runtime/src/entity-timeline.ts:1— packages/agents-runtime/src/entity-timeline.ts has 1821 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-mobile/src/screens/SessionScreen.tsx · ×1
packages/agents-mobile/src/screens/SessionScreen.tsx: 1761 lines of code packages/agents-mobile/src/screens/SessionScreen.tsx:1— packages/agents-mobile/src/screens/SessionScreen.tsx has 1761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/views/NewSessionView.tsx · ×1
packages/agents-server-ui/src/components/views/NewSessionView.tsx: 1505 lines of code packages/agents-server-ui/src/components/views/NewSessionView.tsx:1— packages/agents-server-ui/src/components/views/NewSessionView.tsx has 1505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1488 lines of code REDACTED:1— REDACTED has 1488 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/context-factory.ts · ×1
packages/agents-runtime/src/context-factory.ts: 1278 lines of code packages/agents-runtime/src/context-factory.ts:1— packages/agents-runtime/src/context-factory.ts has 1278 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/OnboardingModal.tsx · ×1
packages/agents-server-ui/src/components/OnboardingModal.tsx: 1267 lines of code packages/agents-server-ui/src/components/OnboardingModal.tsx:1— packages/agents-server-ui/src/components/OnboardingModal.tsx has 1267 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/setup-context.ts · ×1
packages/agents-runtime/src/setup-context.ts: 1228 lines of code packages/agents-runtime/src/setup-context.ts:1— packages/agents-runtime/src/setup-context.ts has 1228 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/entity-schema.ts · ×1
packages/agents-runtime/src/entity-schema.ts: 1212 lines of code packages/agents-runtime/src/entity-schema.ts:1— packages/agents-runtime/src/entity-schema.ts has 1212 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/types.ts · ×1
packages/agents-runtime/src/types.ts: 1175 lines of code packages/agents-runtime/src/types.ts:1— packages/agents-runtime/src/types.ts has 1175 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1043 lines of code REDACTED:1— REDACTED has 1043 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/electric-ax/src/index.ts · ×1
packages/electric-ax/src/index.ts: 981 lines of code packages/electric-ax/src/index.ts:1— packages/electric-ax/src/index.ts has 981 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/AgentResponse.tsx · ×1
packages/agents-server-ui/src/components/AgentResponse.tsx: 963 lines of code packages/agents-server-ui/src/components/AgentResponse.tsx:1— packages/agents-server-ui/src/components/AgentResponse.tsx has 963 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/runtime-server-client.ts · ×1
packages/agents-runtime/src/runtime-server-client.ts: 926 lines of code packages/agents-runtime/src/runtime-server-client.ts:1— packages/agents-runtime/src/runtime-server-client.ts has 926 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents/src/agents/horton.ts · ×1
packages/agents/src/agents/horton.ts: 917 lines of code packages/agents/src/agents/horton.ts:1— packages/agents/src/agents/horton.ts has 917 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx · ×1
packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx: 904 lines of code packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx:1— packages/agents-server-ui/src/lib/ElectricAgentsProvider.tsx has 904 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/wake-registry.ts · ×1
packages/agents-server/src/wake-registry.ts: 891 lines of code packages/agents-server/src/wake-registry.ts:1— packages/agents-server/src/wake-registry.ts has 891 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/routing/internal-router.ts · ×1
packages/agents-server/src/routing/internal-router.ts: 886 lines of code packages/agents-server/src/routing/internal-router.ts:1— packages/agents-server/src/routing/internal-router.ts has 886 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/EntityContextDrawer.tsx · ×1
packages/agents-server-ui/src/components/EntityContextDrawer.tsx: 854 lines of code packages/agents-server-ui/src/components/EntityContextDrawer.tsx:1— packages/agents-server-ui/src/components/EntityContextDrawer.tsx has 854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/electric-ax/src/observe-ui.tsx · ×1
packages/electric-ax/src/observe-ui.tsx: 827 lines of code packages/electric-ax/src/observe-ui.tsx:1— packages/electric-ax/src/observe-ui.tsx has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/entity-stream-db.ts · ×1
packages/agents-runtime/src/entity-stream-db.ts: 804 lines of code packages/agents-runtime/src/entity-stream-db.ts:1— packages/agents-runtime/src/entity-stream-db.ts has 804 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-runtime/src/pi-adapter.ts · ×1
packages/agents-runtime/src/pi-adapter.ts: 764 lines of code packages/agents-runtime/src/pi-adapter.ts:1— packages/agents-runtime/src/pi-adapter.ts has 764 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 754 lines of code REDACTED:1— REDACTED has 754 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/scheduler.ts · ×1
packages/agents-server/src/scheduler.ts: 752 lines of code packages/agents-server/src/scheduler.ts:1— packages/agents-server/src/scheduler.ts has 752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/entity-projector.ts · ×1
packages/agents-server/src/entity-projector.ts: 747 lines of code packages/agents-server/src/entity-projector.ts:1— packages/agents-server/src/entity-projector.ts has 747 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-mobile/src/screens/ShareSessionScreen.tsx · ×1
packages/agents-mobile/src/screens/ShareSessionScreen.tsx: 736 lines of code packages/agents-mobile/src/screens/ShareSessionScreen.tsx:1— packages/agents-mobile/src/screens/ShareSessionScreen.tsx has 736 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/stream-client.ts · ×1
packages/agents-server/src/stream-client.ts: 729 lines of code packages/agents-server/src/stream-client.ts:1— packages/agents-server/src/stream-client.ts has 729 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/db/schema.ts · ×1
packages/agents-server/src/db/schema.ts: 727 lines of code packages/agents-server/src/db/schema.ts:1— packages/agents-server/src/db/schema.ts has 727 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/typescript-client/src/shape-stream-state.ts · ×1
packages/typescript-client/src/shape-stream-state.ts: 724 lines of code packages/typescript-client/src/shape-stream-state.ts:1— packages/typescript-client/src/shape-stream-state.ts has 724 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server/src/routing/durable-streams-router.ts · ×1
packages/agents-server/src/routing/durable-streams-router.ts: 709 lines of code packages/agents-server/src/routing/durable-streams-router.ts:1— packages/agents-server/src/routing/durable-streams-router.ts has 709 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-mobile/src/screens/NewSessionScreen.tsx · ×1
packages/agents-mobile/src/screens/NewSessionScreen.tsx: 707 lines of code packages/agents-mobile/src/screens/NewSessionScreen.tsx:1— packages/agents-mobile/src/screens/NewSessionScreen.tsx has 707 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-mobile/src/lib/cloudAuth.ts · ×1
packages/agents-mobile/src/lib/cloudAuth.ts: 696 lines of code packages/agents-mobile/src/lib/cloudAuth.ts:1— packages/agents-mobile/src/lib/cloudAuth.ts has 696 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-server-ui/src/components/ShareEntityDialog.tsx · ×1
packages/agents-server-ui/src/components/ShareEntityDialog.tsx: 687 lines of code packages/agents-server-ui/src/components/ShareEntityDialog.tsx:1— packages/agents-server-ui/src/components/ShareEntityDialog.tsx has 687 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/agents-mobile/src/screens/OnboardingScreen.tsx · ×1
packages/agents-mobile/src/screens/OnboardingScreen.tsx: 680 lines of code packages/agents-mobile/src/screens/OnboardingScreen.tsx:1— packages/agents-mobile/src/screens/OnboardingScreen.tsx has 680 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 (~704 LoC) packages/agents-mobile/src/components/HomeMenu.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~474 LoC) packages/agents-mobile/src/screens/SessionListScreen.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/app/index.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~319 LoC) packages/agents-mobile/src/components/SessionRow.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/agents-mobile/src/components/SessionTree.tsx, packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~303 LoC) packages/agents-server-ui/src/embed/EmbedApp.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (packages/agents-server-ui/src/embed/SessionChatLogDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionStateInspectorDomEmbed.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~222 LoC) packages/agents-mobile/src/components/SessionRowMenu.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~189 LoC) packages/durable-streams-rust/bench-latency/run-latency-matrix.mjs— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~173 LoC) packages/agents-mobile/app/_layout.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~169 LoC) packages/agents-mobile/src/lib/sessionBuckets.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~135 LoC) packages/agents-mobile/src/lib/sidebarPrefs.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/agents-mobile/src/components/HomeMenu.tsx, packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~134 LoC) packages/agents-mobile/src/components/SessionTree.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~125 LoC) packages/agents-mobile/src/components/SearchBar.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~121 LoC) packages/agents-mobile/src/lib/expandedTree.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/components/SessionTree.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~98 LoC) packages/agents-mobile/src/components/Fab.tsx— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/screens/SessionListScreen.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~87 LoC) packages/agents-server-ui/src/embed/SessionChatLogDomEmbed.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~70 LoC) packages/agents-server/src/electric-agents/adapter-types.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~65 LoC) packages/agents-server-ui/src/ui/index.web.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~48 LoC) packages/agents-server-ui/src/embed/stubs/shiki.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~47 LoC) packages/agents-server-ui/src/embed/SessionDomEmbed.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~44 LoC) packages/agents-server-ui/src/embed/mobileDomRuntime.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (packages/agents-server-ui/src/embed/SessionChatLogDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionDomEmbed.tsx, packages/agents-server-ui/src/embed/SessionStateInspectorDomEmbed.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~38 LoC) packages/agents-server-ui/src/components/MarkdownCodeBlock.web.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~34 LoC) packages/agents-server-ui/src/embed/SessionStateInspectorDomEmbed.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~29 LoC) packages/agents-mobile/src/lib/useAvailableServers.ts— no import path from any entry point (71 application, 61 tooling, 288 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (packages/agents-mobile/src/components/HomeMenu.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~24 LoC) packages/agents-mobile/app/index.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~21 LoC) packages/agents-server-ui/src/embed/stubs/mermaid.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~7 LoC) packages/agents-server/src/authenticated-user-format.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~5 LoC) packages/agents-mobile/App.tsx— no import path from any entry point (71 application, 61 tooling, 288 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
Dead file (~1 LoC) packages/agents-server/src/electric-agents/default-entity-schemas.ts— no import path from any entry point (71 application, 61 tooling, 288 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
Unused dependency '@mixmark-io/domino' packages/agents-desktop/package.json:31— Declared in packages/agents-desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'pino' packages/agents-desktop/package.json:38— Declared in packages/agents-desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'turndown-plugin-gfm' packages/agents-desktop/package.json:41— Declared in packages/agents-desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@sentry/cli' packages/agents-mobile/package.json:53— Declared in packages/agents-mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'expo-build-properties' packages/agents-mobile/package.json:29— Declared in packages/agents-mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'expo-splash-screen' packages/agents-mobile/package.json:36— Declared in packages/agents-mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'expo-system-ui' packages/agents-mobile/package.json:38— Declared in packages/agents-mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@anthropic-ai/sdk' packages/agents-server/package.json:47— Declared in packages/agents-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'cron-parser' packages/agents-server/package.json:58— Declared in packages/agents-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'lmdb' packages/agents-server/package.json:62— Declared in packages/agents-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'vitest-localstorage-mock' packages/typescript-client/package.json:37— Declared in packages/typescript-client/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked examples/burn/assets/package.json:18— examples/burn/assets/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Swallowed exception (caught, then discarded) packages/agents-server-ui/src/hooks/useWorkspacePersistence.ts:102— `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Orphaned file packages/agents-server-ui/src/components/SearchPalette.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/sync-service/lib/electric/postgres/replication_connection.ex:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-desktop/src/cloud/cloud-auth.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-runtime/src/composer-input.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/workspace/Workspace.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-mobile/src/components/SchemaArgsControls.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/experimental/src/multi-shape-stream.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/sync-service/lib/electric/replication/publication_manager/configurator.ex:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/SidebarRow.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-desktop/src/app/updater.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/lib/workspace/layoutCodec.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/workspace/PaneFindBar.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-desktop/src/runtime/mcp.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/lib/sessionGroups.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-desktop/src/cli/controller.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-desktop/src/ui/application-menu.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/SettingsMenu.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-mobile/src/components/SessionRow.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-mobile/src/components/BottomSheet.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/workspace/TileContainer.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/components/MarkdownTable.tsx:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/agents-server-ui/src/hooks/useWorkspacePersistence.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/sync-service/lib/electric/postgres/identifiers.ex: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.
Duplicated predicate packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:262— `is_integer(keep_complete_chunks) and keep_complete_chunks >= 0` appears character-identically in 2 files — packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex, packages/sync-service/lib/electric/shape_cache/storage.ex. 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 packages/elixir-client/lib/electric/client/offset.ex:34— `is_integer(tx_offset) and tx_offset >= 0 and is_integer(op_offset) and op_offset >= 0` appears character-identically in 2 files — packages/elixir-client/lib/electric/client/offset.ex, packages/sync-service/lib/electric/replication/log_offset.ex. 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 packages/sync-service/lib/electric/shape_cache.ex:127— `is_shape_handle(shape_handle) and is_stack_id(stack_id)` appears character-identically in 2 files — packages/sync-service/lib/electric/shape_cache.ex, packages/sync-service/lib/electric/shapes.ex. 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 packages/sync-service/lib/electric/shape_cache/shape_status.ex:313— `is_stack_id(stack_id) and is_shape_handle(shape_handle)` appears character-identically in 5 files — packages/sync-service/lib/electric/shape_cache/shape_status.ex, packages/sync-service/lib/electric/shape_cache/shape_status/shape_db.ex, packages/sync-service/lib/electric/shapes/consumer/materializer.ex, packages/sync-service/lib/electric/shapes/consumer/snapshotter.ex. 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 REDACTED:727— `!Number.isSafeInteger(grantId) || grantId <= 0` appears character-identically in 2 files — REDACTED, packages/agents-server/src/routing/entity-types-router.ts. 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 packages/agents-runtime/src/timeline-context.ts:618— `!attachments || attachments.length === 0` appears character-identically in 2 files — packages/agents-runtime/src/timeline-context.ts, packages/agents-server-ui/src/lib/sendMessage.ts. 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 scripts/ci/affected-workspaces.mjs:159— `!base || /^0+$/.test(base) || files.length === 0` appears character-identically in 3 files — scripts/ci/affected-workspaces.mjs, scripts/ci/desktop-affected.mjs, scripts/ci/mobile-affected.mjs. 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 website/src/components/home/iso/render.ts:1846— `!crop.highlightThreads || crop.highlightThreads.length === 0` appears character-identically in 2 files — website/src/components/home/iso/render.ts, website/src/components/home/iso/simulate.ts. 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 packages/agents-server-ui/src/components/EntityContextDrawer.tsx:171— `!entitiesCollection || referencedEntityUrls.length === 0` appears character-identically in 2 files — packages/agents-server-ui/src/components/EntityContextDrawer.tsx, packages/agents-server-ui/src/components/EntityTimeline.tsx. 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 packages/agents/src/entrypoint-lib.ts:68— `!parsed || typeof parsed !== `object` || Array.isArray(parsed)` appears character-identically in 3 files — packages/agents/src/entrypoint-lib.ts, packages/electric-ax/src/index.ts, packages/electric-ax/src/start.ts. 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 REDACTED:233— `!schema || typeof schema !== `object` || Array.isArray(schema)` appears character-identically in 2 files — REDACTED, packages/agents-server-ui/src/lib/schemaProperties.ts. 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 packages/agents-desktop/src/cloud/cloud-auth.ts:382— `!token || !state || !email || !expiresAt` appears character-identically in 3 files — packages/agents-desktop/src/cloud/cloud-auth.ts, packages/agents-mobile/app/oauth/callback.tsx, packages/agents-mobile/src/lib/cloudAuth.ts. 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 packages/agents-desktop/src/shared/headers.ts:59— `!value || typeof value !== `object` || Array.isArray(value)` appears character-identically in 3 files — packages/agents-desktop/src/shared/headers.ts, packages/agents-runtime/src/webhook-signature.ts, packages/electric-ax/src/index.ts. 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 packages/agents-server/src/utils/log.ts:9— `LOG_LEVEL !== `silent` && !process.env.VITEST && !IS_ELECTRON_MAIN` appears character-identically in 2 files — packages/agents-server/src/utils/log.ts, packages/agents/src/log.ts. 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 packages/agents-runtime/src/context-factory.ts:683— `attachment.status !== `complete` || !attachment.mimeType.startsWith(`image/`)` appears character-identically in 2 files — packages/agents-runtime/src/context-factory.ts, packages/agents-server-ui/src/components/EntityContextDrawer.tsx. 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 packages/agents-mobile/src/lib/useEntityPermissions.ts:88— `creatorUrl !== null && principalUrl !== null && creatorUrl === principalUrl` appears character-identically in 2 files — packages/agents-mobile/src/lib/useEntityPermissions.ts, packages/agents-server-ui/src/hooks/useEntityPermission.ts. 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 packages/agents-server-ui/src/components/MessageInput.tsx:191— `db && (db.collections as Record<string, unknown>).comments` appears character-identically in 2 files — packages/agents-server-ui/src/components/MessageInput.tsx, packages/agents-server-ui/src/hooks/useEntityTimeline.ts. 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 packages/agents-mobile/src/screens/SessionScreen.tsx:399— `entity.status === `stopped` || entity.status === `killed`` appears character-identically in 2 files — packages/agents-mobile/src/screens/SessionScreen.tsx, packages/agents-server-ui/src/components/SidebarRow.tsx. 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 packages/agents-mobile/src/components/SessionMenu.tsx:167— `entity?.status === `stopped` || entity?.status === `killed`` appears character-identically in 3 files — packages/agents-mobile/src/components/SessionMenu.tsx, packages/agents-server-ui/src/components/workspace/SplitMenu.tsx, packages/agents-server-ui/src/components/workspace/TileContainer.tsx. 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 packages/agents-runtime/src/tools/edit.ts:116— `err instanceof SandboxError && err.kind === `policy`` appears character-identically in 4 files — packages/agents-runtime/src/tools/edit.ts, packages/agents-runtime/src/tools/fetch-url.ts, packages/agents-runtime/src/tools/read-file.ts, packages/agents-runtime/src/tools/write.ts. 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 packages/agents-server/src/entity-bridge-manager.ts:326— `event.type !== `members` || typeof event.key !== `string`` appears character-identically in 2 files — packages/agents-server/src/entity-bridge-manager.ts, packages/agents-server/src/entity-projector.ts. 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 scripts/ci/desktop-affected.mjs:37— `globalChange || affectedWorkspaces.length > 0` appears character-identically in 2 files — scripts/ci/desktop-affected.mjs, scripts/ci/mobile-affected.mjs. 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 packages/agents-mobile/src/screens/SessionScreen.tsx:607— `inlineQueuedSubmits && message.mode === `queued`` appears character-identically in 2 files — packages/agents-mobile/src/screens/SessionScreen.tsx, packages/agents-server-ui/src/components/MessageInput.tsx. 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 packages/agents-mobile/src/lib/useEntityPermissions.ts:68— `isBuiltInSystemPrincipal(principal) || isEntityCreator(entity, principal)` appears character-identically in 2 files — packages/agents-mobile/src/lib/useEntityPermissions.ts, packages/agents-server-ui/src/hooks/useEntityPermission.ts. 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 packages/typescript-client/src/helpers.ts:60— `isControlMessage(message) && message.headers.control === `up-to-date`` appears character-identically in 2 files — packages/typescript-client/src/helpers.ts, packages/y-electric/src/y-electric.ts. 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.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:208— `warn` at line 208 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:257— `info` at line 257 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:375— `warn` at line 375 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:452— `warn` at line 452 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:571— `warn` at line 571 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-bridge-manager.ts:739— `warn` at line 739 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-manager.ts:2294— `warn` at line 2294 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-manager.ts:2302— `warn` at line 2302 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-manager.ts:3306— `warn` at line 3306 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-manager.ts:3426— `warn` at line 3426 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-projector.ts:175— `warn` at line 175 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-projector.ts:620— `warn` at line 620 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-projector.ts:641— `warn` at line 641 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-projector.ts:687— `warn` at line 687 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/entity-projector.ts:736— `warn` at line 736 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/pg-sync-bridge-manager.ts:384— `warn` at line 384 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/pg-sync-bridge-manager.ts:394— `warn` at line 394 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/pg-sync-bridge-manager.ts:403— `warn` at line 403 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/pg-sync-bridge-manager.ts:502— `warn` at line 502 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/pg-sync-bridge-manager.ts:509— `warn` at line 509 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/runtime.ts:185— `warn` at line 185 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/runtime.ts:465— `warn` at line 465 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/runtime.ts:473— `warn` at line 473 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging packages/agents-server/src/scheduler.ts:612— `warn` at line 612 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging REDACTED:214— `info` at line 214 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
redundant comment packages/agents-runtime/test/setup-context.test.ts:1710— "During setup, send throws" repeats the code it sits on: 3 of its 3 words (setup, send, throws) are already in `expect(() => branch.send({ explore: `path A` })).toThrow(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:556— "Updated spawn (typeName + instanceId)" repeats the code it sits on: 5 of its 6 words (spawn, type, name, instance, id) are already in `| {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:660— "Last list result" repeats the code it sits on: 3 of its 3 words (last, list, result) are already in `lastListResult: Array<{`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server-conformance-tests/src/electric-agents-dsl.ts:678— "Last entity type list result" repeats the code it sits on: 4 of its 5 words (last, type, list, result) are already in `lastTypeListResult: Array<{`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server/test/wake-registry.test.ts:1122— "Write run completed to child stream" repeats the code it sits on: 4 of its 5 words (run, completed, child, stream) are already in `await appendInternalEvent(child.streams.main, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server/test/wake-registry.test.ts:1214— "Write run completed to child stream" repeats the code it sits on: 4 of its 5 words (run, completed, child, stream) are already in `await appendInternalEvent(child.streams.main, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/agents-server/test/wake-registry.test.ts:1320— "Write run failed to child stream" repeats the code it sits on: 4 of its 5 words (run, failed, child, stream) are already in `await appendInternalEvent(child.streams.main, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/experimental/test/multi-shape-stream.test.ts:120— "Find messages for each shape" repeats the code it sits on: 3 of its 3 words (find, messages, shape) are already in `const lowPriorityMsg = changeMessages.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/experimental/test/multi-shape-stream.test.ts:364— "Find the message group containing our changes" repeats the code it sits on: 4 of its 5 words (find, message, group, changes) are already in `const changeGroup = messageGroups.find((group) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/start/test/cli.test.ts:14— "Mock child_process execSync" repeats the code it sits on: 5 of its 5 words (mock, child, process, exec, sync) are already in `vi.mock(`child_process`, () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/start/test/template-setup.test.ts:3— "Mock child_process" repeats the code it sits on: 3 of its 3 words (mock, child, process) are already in `vi.mock(`child_process`, () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/start/test/template-setup.test.ts:72— "Find the .env write call" repeats the code it sits on: 4 of its 4 words (find, env, write, call) are already in `const envWriteCall = mockWriteFileSync.mock.calls.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/src/client.ts:1366— "Create a new AbortController for this request" repeats the code it sits on: 5 of its 5 words (create, new, abort, controller, request) are already in `this.#requestAbortController = new AbortController()`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/src/client.ts:1634— "Enter replay mode and store the last seen cursor" repeats the code it sits on: 6 of its 7 words (enter, replay, mode, last, seen, cursor) are already in `this.#syncState = this.#syncState.enterReplayMode(lastSeenCursor)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/client.test.ts:1379— "Return a new response with our custom stream" repeats the code it sits on: 4 of its 5 words (return, new, response, stream) are already in `return new Response(filteredStream, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/client.test.ts:1408— "Subscribe to the shape stream" repeats the code it sits on: 3 of its 3 words (subscribe, shape, stream) are already in `const unsubscribe = shapeStream.subscribe((messages) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/client.test.ts:1430— "Wait for initial sync" repeats the code it sits on: 3 of its 3 words (wait, initial, sync) are already in `await initialSyncComplete`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/client.test.ts:1917— "Find the first insert from the snapshot (has snapshot_mark)" repeats the code it sits on: 5 of its 5 words (find, first, insert, snapshot, mark) are already in `const firstSnapshotInsertIndex = allMessages.findIndex(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/column-mapper.test.ts:417— "Chained: columnMapper first, then transformer" repeats the code it sits on: 4 of its 5 words (chained, column, mapper, transformer) are already in `const chained = (row: Record<string, unknown>) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/expired-shapes-cache.test.ts:72— "Mark shape as expired" repeats the code it sits on: 3 of its 3 words (mark, shape, expired) are already in `cache.markExpired(shapeUrl1, handle1)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/expired-shapes-cache.test.ts:86— "Mark shape as expired" repeats the code it sits on: 3 of its 3 words (mark, shape, expired) are already in `cache.markExpired(shapeUrl, handle)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/expired-shapes-cache.test.ts:469— "Wait for second request to be made" repeats the code it sits on: 4 of its 4 words (wait, second, request, made) are already in `await secondRequestMade`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/shape-stream-state.test.ts:255— "SSE state is preserved when LiveState transitions to itself" repeats the code it sits on: 5 of its 5 words (sse, state, preserved, live, transitions) are already in `it(`SSE state is preserved through LiveState self-transitions`, () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/typescript-client/test/stream.test.ts:936— "Find the change message" repeats the code it sits on: 3 of its 3 words (find, change, message) are already in `const changeMessage = receivedMessages.find(isChangeMessage)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:37— "Extract commit hashes from the changelog for this version" repeats the code it sits on: 4 of its 5 words (extract, commit, changelog, version) are already in `const commits = extractCommitsFromChangelog(changelogPath, version)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
+ 1 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×26
Console output used as the logging channel packages/agents/src/bootstrap.ts:485— `packages/agents/src/bootstrap.ts` reports through `console.*` at line 485 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/bootstrap.ts:487— `packages/agents/src/bootstrap.ts` reports through `console.*` at line 487 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/durable-streams-cache.ts:25— `packages/agents/src/durable-streams-cache.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:182— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 182 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:194— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 194 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:195— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 195 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:196— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:207— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:212— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 212 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents/src/entrypoint-lib.ts:216— `packages/agents/src/entrypoint-lib.ts` reports through `console.*` at line 216 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:458— `REDACTED` reports through `console.*` at line 458 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-runtime/src/entity-stream-db.ts:632— `packages/agents-runtime/src/entity-stream-db.ts` reports through `console.*` at line 632 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-runtime/src/pull-wake-runner.ts:221— `packages/agents-runtime/src/pull-wake-runner.ts` reports through `console.*` at line 221 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-runtime/src/sandbox/docker/loader.ts:160— `packages/agents-runtime/src/sandbox/docker/loader.ts` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:245— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 245 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:257— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 257 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:258— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 258 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:261— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 261 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:263— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 263 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:265— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 265 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:276— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 276 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:281— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 281 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/entrypoint-lib.ts:285— `packages/agents-server/src/entrypoint-lib.ts` reports through `console.*` at line 285 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/runtime-registry.ts:17— `packages/agents-server/src/runtime-registry.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/agents-server/src/scheduler.ts:310— `packages/agents-server/src/scheduler.ts` reports through `console.*` at line 310 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Mock-dominated test: should NOT set up wake detection timer in browser environments packages/typescript-client/test/wake-detection.test.ts:41— This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: uses the agents-runtime StreamDB helper so row timeline ordering matches the UI packages/electric-ax/test/entity-stream-db.test.ts:21— This test sets up 3 test doubles (for example `vi.spyOn`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: ensures a users row when materializing a user principal packages/agents-server/test/electric-agents-manager-principals.test.ts:54— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: uses the manifest source index during idle GC instead of replaying all entity streams packages/agents-server/test/entity-bridge-manager.test.ts:595— This test sets up 6 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: starts already-registered tenant runtime work when host starts packages/agents-server/test/host.test.ts:85— This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: persists registration with canonical options and updates cursor after messages packages/agents-server/test/pg-sync-bridge-manager.test.ts:310— This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: stops the pg-sync bridge manager packages/agents-server/test/runtime-shutdown.test.ts:5— This test sets up 6 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: recovers from transient run loop errors instead of stopping permanently packages/agents-server/test/scheduler.test.ts:385— This test sets up 6 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: starts pg-sync bridge manager even when entity bridge manager startup is disabled packages/agents-server/test/standalone-runtime.test.ts:19— This test sets up 6 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: delegates pg-sync bridge manager shutdown to runtime.stop once packages/agents-server/test/standalone-runtime.test.ts:54— This test sets up 6 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: marks failed rows and keeps their claims releasable packages/agents-server/test/tag-stream-outbox-drainer.test.ts:6— This test sets up 5 test doubles (for example `vi.fn`) against 3 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: waits for an active drain before releasing claims on stop packages/agents-server/test/tag-stream-outbox-drainer.test.ts:55— This test sets up 5 test doubles (for example `vi.fn`) against 3 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: filters shared claims to registered tenant ids packages/agents-server/test/tag-stream-outbox-drainer.test.ts:111— This test sets up 5 test doubles (for example `vi
.fn`) against 2 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: soft-skips rows for tenants missing during publish packages/agents-server/test/tag-stream-outbox-drainer.test.ts:163— This test sets up 5 test doubles (for example `vi.fn`) against 3 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: skips the pull when the image is already present (no registry round-trip) packages/agents-runtime/test/sandbox-docker-ensure-image.test.ts:32— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does nothing when pullIfMissing is false (fail-fast / pre-pulled) packages/agents-runtime/test/sandbox-docker-ensure-image.test.ts:45— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Pattern 3 (PR Reviewer): args from creationSchema are accessible packages/agents-runtime/test/setup-context.test.ts:1377— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Pattern 3 (PR Reviewer): state proxy insert records review packages/agents-runtime/test/setup-context.test.ts:1415— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Pattern 10 (Metrics Digest): args for schedule and state writes coexist packages/agents-runtime/test/setup-context.test.ts:1940— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: inline observe derives the entity main stream path locally packages/agents-runtime/test/setup-context.test.ts:2110— This test sets up 8 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: custom source with streamUrl passes an absolute URL to wiring packages/agents-runtime/test/setup-context.test.ts:2220— This test sets up 6 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: composes cache interceptor on the existing global dispatcher packages/agents/test/durable-streams-cache.test.ts:37— This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: uses the selected model when running Horton packages/agents/test/horton-model-selection.test.ts:84— This test sets up 10 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Silent fallback default in catch packages/agents-desktop/src/ui/about-dialog.ts:21— `showAboutDialog` 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.
Silent fallback default in catch packages/agents-runtime/src/runtime-server-client.ts:339— `createRuntimeServerClient.readTxidResponse` 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.
Silent fallback default in catch packages/agents-runtime/src/token-accountant.ts:135— `parseContextBreakdown` 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.
Silent fallback default in catch packages/agents-runtime/src/skills/registry.ts:131— `loadCache` 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.
Silent fallback default in catch REDACTED:255— `listRefFiles` 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.
Silent fallback default in catch packages/agents-runtime/src/sandbox/docker.ts:742— `sweepOrphanedDockerSandboxes` 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.
Silent fallback default in catch packages/agents-server-ui/src/lib/server-connection.ts:521— `loadServers` 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.
Silent fallback default in catch packages/agents-server-ui/src/hooks/usePinnedEntities.tsx:21— `PinnedEntitiesProvider` 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.
Silent fallback default in catch packages/agents-server-ui/src/components/views/NewSessionView.tsx:124— `readCodexPromptDismissed` 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.
Silent fallback default in catch packages/electric-ax/src/observe-ui.tsx:38— `formatTime` 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.
Silent fallback default in catch scripts/ci/affected-workspaces.mjs:153— `getChangedFiles` 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.
Silent fallback default in catch scripts/ci/desktop-affected.mjs:101— `getChangedFiles` 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.
Silent fallback default in catch scripts/ci/mobile-affected.mjs:99— `getChangedFiles` 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.
Silent fallback default on error packages/sync-service/lib/electric/config.ex:652— `parse_http2_max_reset_stream_rate` matches `true` and answers `{:ok, :disabled}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache.ex:98— `resolve_shape_handle` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shapes/consumer_registry.ex:287— `start_consumer!` matches `{:error, :no_shape}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shapes/shape.ex:891— `compute_active_conditions` matches `_` and answers `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shapes/filter/where_condition.ex:218— `subquery_optimisation` matches `_` and answers `:not_optimised` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/shape_cleaner.ex:150— `remove_shapes_immediate` matches `{:error, :data_removed}` and answers `[]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:169— `read_last_n_chunks` matches `{:error, :enoent}` and answers `[]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:176— `file_size` matches `{:error, :enoent}` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/pure_file_storage/chunk_index.ex:190— `realign_and_trim` matches `{:error, :enoent}` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/pure_file_storage/file_info.ex:78— `recursive_disk_usage` matches `{:error, _}` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/shape_cache/pure_file_storage/key_index.ex:38— `read_key_file` matches `:eof` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/replication/shape_log_collector.ex:1131— `pk_cols_of_relation` matches `:table_not_found` and answers `{:ok, []}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error packages/sync-service/lib/electric/plug/trace_context_plug.ex:108— `sample_rate_hint` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/lsn_tracker.ex:89— `get_last_broadcast_lsn` rescues `ArgumentError` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/status_monitor.ex:384— `db_state` rescues `ArgumentError` and answers `:up` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/shapes/consumer_registry.ex:66— `active_consumer_count` rescues `ArgumentError` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/shapes/consumer_registry.ex:270— `consumer_pid` rescues `ArgumentError` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:1168— `safe_next_lookup` rescues `ArgumentError` and answers `:ets_dead` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/shape_cache/pure_file_storage.ex:1321— `update_global_persistence_information` rescues `ArgumentError` and answers `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/write_buffer.ex:160— `pending_operations_count` rescues `ArgumentError` and answers `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/postgres/inspector/ets_inspector.ex:385— `fetch_normalized_relation_from_ets` rescues `ArgumentError` and answers `:not_in_cache` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/postgres/inspector/ets_inspector.ex:398— `fetch_relation_info_from_ets` rescues `ArgumentError` and answers `:not_in_cache` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/postgres/inspector/ets_inspector.ex:411— `fetch_column_info_from_ets` rescues `ArgumentError` and answers `:not_in_cache` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/postgres/inspector/ets_inspector.ex:422— `fetch_supported_features_from_ets` rescues `ArgumentError` and answers `:not_in_cache` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/sync-service/lib/electric/plug/serve_shape_plug.ex:348— `admission_kind` rescues `ArgumentError` and answers `:initial` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue packages/electric-telemetry/lib/electric/telemetry/disk_usage.ex:26— `current` rescues `ArgumentError` and answers `:pending` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×6
Projects may be oversized for their cohesion packages/sync-service/mix.exs:1— `packages/sync-service` (39324 LoC, 294 module-visible types across 37 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `packages/agents-server-ui` (36708 LoC, 266 module-visible types across 13 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/agents-runtime/package.json:1— `packages/agents-runtime` (26776 LoC, 350 module-visible types across 7 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/agents-server/package.json:1— `packages/agents-server` (21037 LoC, 189 module-visible types across 5 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion website/package.json:1— `website` (9278 LoC, 89 module-visible types across 12 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/agents-desktop/package.json:1— `packages/agents-desktop` (8159 LoC, 72 module-visible types across 15 directories) overshoots its size bounds. 6 of 20 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 4.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Fat interface: RuntimeServerClient (25 required operations) packages/agents-runtime/src/runtime-server-client.ts:121— `RuntimeServerClient` declares 25 required operations: `sendEntityMessage`, `createAttachment`, `readAttachment`, `spawnEntity`, `forkEntity`, `getEntity`, `ensureSharedStateStream`, `signalEntity`, `ensureStream`, `deleteEntity`, `unregisterWake`, `getSharedStateStreamPath`, `registerWake`, `ensureCronStream`, `ensureEntitiesMembershipStream`, `registerPgSyncSource`, `listWebhookSources`, `subscribeToWebhookSource`, `unsubscribeFromWebhookSource`, `removePgSyncObservation`, `upsertCronSchedule`, `upsertFutureSendSchedule`, `deleteSchedule`, `setTag`, `deleteTag`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: WakeSession (16 required operations) packages/agents-runtime/src/types.ts:808— `WakeSession` declares 16 required operations: `getPhase`, `registerManifestEntry`, `removeManifestEntry`, `commitManifestEntries`, `rollbackManifestEntries`, `registerSharedStateHandle`, `registerSpawnHandle`, `registerSourceHandle`, `enqueueSend`, `getManifest`, `getPendingSends`, `getSharedStateHandles`, `getSpawnHandles`, `getSourceHandles`, `finishSetup`, `close`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: HandlerContext (24 required operations) packages/agents-runtime/src/types.ts:1057— `HandlerContext` declares 24 required operations: `useAgent`, `useContext`, `timelineMessages`, `insertContext`, `removeContext`, `getContext`, `listContext`, `setGoal`, `clearGoal`, `getGoal`, `markGoalComplete`, `updateGoalUsage`, `spawn`, `fork`, `forkSelf`, `unobserve`, `mkdb`, `send`, `onSignal`, `recordRun`, `replyText`, `sleep`, `setTag`, `deleteTag`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: SetupContextResult (16 required operations) packages/agents-runtime/src/setup-context.ts:153— `SetupContextResult` declares 16 required operations: `spawn`, `fork`, `send`, `observe`, `createEffect`, `mkdb`, `getManifest`, `getPendingSends`, `getSharedStateHandles`, `getSpawnHandles`, `getSourceHandles`, `getSourceHandleCache`, `setInSetup`, `ensureObservedHandle`, `preloadDeferredObservedHandles`, `restorePersistedSharedStateHandles`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ElectricCliHandlers (16 required operations) packages/electric-ax/src/index.ts:90— `ElectricCliHandlers` declares 16 required operations: `listTypes`, `inspectType`, `deleteType`, `spawn`, `send`, `observe`, `view`, `inspect`, `ps`, `signal`, `kill`, `start`, `startBuiltin`, `stop`, `quickstart`, `init`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 10 significant file(s) lose their only recent owner: packages/durable-streams-rust/src/wal/shard.rs, packages/durable-streams-rust/src/store.rs, packages/durable-streams-rust/src/handlers.rs, packages/durable-streams-rust/src/tier.rs, packages/durable-streams-rust/src/main.rs, packages/durable-streams-rust/src/sse_reactor.rs, packages/durable-streams-rust/src/engine_raw.rs, packages/agents/skills/quickstart/scaffold-ui/main.tsx (+2 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/write_buffer.ex, packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/query.ex, packages/elixir-client/lib/electric/client/expired_shapes_cache.ex, packages/sync-service/lib/electric/shape_cache/shape_status/shape_db/supervisor.ex. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: packages/sync-service/lib/electric/shapes/filter/indexes/subquery_index.ex, packages/sync-service/lib/electric/shapes/filter/indexes/inclusion_index.ex, packages/sync-service/lib/electric/shapes/filter/indexes/equality_index.ex. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: packages/agents-runtime/src/token-accountant.ts, packages/agents-mobile/src/screens/AccountScreen.tsx, packages/agents-server-ui/src/components/ContextUsageIndicator.tsx. Pair on, review, or document these before any departure.
IC1 · Incompleteness & stubs· Empty method body · ×3
Empty method body packages/agents-server-ui/src/embed/stubs/mermaid.ts:15— `initialize` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/agents-server/src/entity-registry.ts:210— `initialize` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/agents-server/src/entity-registry.ts:212— `close` has an empty body — confirm it's an intentional no-op and not an unfinished method.
README/code drift packages/durable-streams-rust/README.md:3— packages/durable-streams-rust/README.md links to `../../PROTOCOL.md`, but `PROTOCOL.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift website/docs/sync/reference/benchmarks.md:216— website/docs/sync/reference/benchmarks.md names Postgres 14, but the manifest declares `postgres` ^3.4.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift website/docs/sync/reference/benchmarks.md:237— website/docs/sync/reference/benchmarks.md names Postgres 15, but the manifest declares `postgres` ^3.4.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
R8 · Dependency Hygiene· Type-only dependency '@mariozechner/pi-agent-core' in production deps · ×2
Type-only dependency '@mariozechner/pi-agent-core' in production deps packages/agents/src/agents/horton.ts:19— Every import is type-only — move it to devDependencies.
Type-only dependency '@mariozechner/pi-agent-core' in production deps packages/agents-server/src/electric-agents/adapter-types.ts:8— Every import is type-only — move it to devDependencies.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×2
Diagnostic log message is built whether or not it is wanted packages/agents-runtime/src/pi-adapter.ts:498— `debug` at line 498 is called with an argument built by `map((c) => c.type)` (line 501), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted packages/agents-runtime/src/pi-adapter.ts:688— `debug` at line 688 is called with an argument built by `JSON.stringify(eventCounts)` (line 691), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (29 single-owned of 494 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 494 of the 778 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/agents-mobile/src/components/NativeComposer.tsx, packages/agents-mobile/src/components/SessionRowMenu.tsx, packages/typescript-client/src/column-mapper.ts, packages/agents-runtime/src/tools/send.ts, packages/agents-server-ui/src/components/WorkingDirectoryPicker.tsx, packages/agents-server-ui/src/components/settings/SettingsScreen.tsx, integration-tests/support_files/normalize-otel-output.py, packages/electric-telemetry/lib/electric/telemetry/poller.ex (+1 more).
Documentation: no build, run or usage example packages/agents-mobile/README.md:1— `agents-mobile` is runnable (a `start` script in `REDACTED`) and neither `packages/agents-mobile/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
No ADRs found packages/y-electric/package.json:61— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `packages/y-electric/package.json` makes this repository a deployable product (line 61).
D21 · Naming Consistency· `electronAPI` spells `API` where 42 names in the project spell it `Api` · ×1
`electronAPI` spells `API` where 42 names in the project spell it `Api` packages/agents-server-ui/src/lib/server-connection.ts:342— 42 of 44 names in project repository spell the token `Api` (42 of 44; unit: names in project repository containing `Api`). Peers: api-keys.captureEnvApiKeys (packages/agents-desktop/src/credentials/api-keys.ts:16); api-keys.normalizeApiKeys (packages/agents-desktop/src/credentials/api-keys.ts:27); api-keys.hasAnyApiKey (packages/agents-desktop/src/credentials/api-keys.ts:45); api-keys.loadApiKeysFromSecret (packages/agents-desktop/src/credentials/api-keys.ts:56); api-keys.saveApiKeysToSecret (packages/agents-desktop/src/credentials/api-keys.ts:69). Rename to `electronApi`. [rule N6]
D21 · Naming Consistency· `#requestShapeSSE` spells `SSE` where 16 names in the project spell it `Sse` · ×1
`#requestShapeSSE` spells `SSE` where 16 names in the project spell it `Sse` packages/typescript-client/src/client.ts:1733— 16 of 17 names in project repository spell the token `Sse` (16 of 17; unit: names in project repository containing `Sse`). Peers: ShapeStreamOptions.experimentalLiveSse (packages/typescript-client/src/client.ts:355); ShapeStreamOptions.liveSse (packages/typescript-client/src/client.ts:360); ShapeStream.#lastSseConnectionStartTime (packages/typescript-client/src/client.ts:699); ShapeStream.#minSseConnectionDuration (packages/typescript-client/src/client.ts:700); ShapeStream.#maxShortSseConnections (packages/typescript-client/src/client.ts:701). Rename to `#requestShapeSse`. [rule N6]
D21 · Naming Consistency· `#hasBrowserVisibilityAPI` spells `API` where 42 names in the project spell it `Api` · ×1
`#hasBrowserVisibilityAPI` spells `API` where 42 names in the project spell it `Api` packages/typescript-client/src/client.ts:2002— 42 of 44 names in project repository spell the token `Api` (42 of 44; unit: names in project repository containing `Api`). Peers: api-keys.captureEnvApiKeys (packages/agents-desktop/src/credentials/api-keys.ts:16); api-keys.normalizeApiKeys (packages/agents-desktop/src/credentials/api-keys.ts:27); api-keys.hasAnyApiKey (packages/agents-desktop/src/credentials/api-keys.ts:45); api-keys.loadApiKeysFromSecret (packages/agents-desktop/src/credentials/api-keys.ts:56); api-keys.saveApiKeysToSecret (packages/agents-desktop/src/credentials/api-keys.ts:69). Rename to `#hasBrowserVisibilityApi`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 107 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: packages/agents-server-ui/src/components/SearchPalette.tsx, REDACTED, packages/sync-service/lib/electric/postgres/replication_connection.ex, packages/agents-desktop/src/cloud/cloud-auth.ts, packages/agents-server-ui/src/components/settings/pages/ServersPage.tsx, packages/agents-runtime/src/composer-input.ts, packages/agents-server-ui/src/components/workspace/Workspace.tsx, packages/agents-mobile/src/components/SchemaArgsControls.tsx (and 99 more) (110 orphaned of 494 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 494 of the 778 production source files in this repository met that bar). 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.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 7/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `packages/agents-desktop`, `packages/agents-server-conformance-tests`, `packages/agents/skills/quickstart/scaffold`, `packages/electric-ax` and 3 more.
No dependency-update automation REDACTED:4— `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code· Unused export 'CredentialsController' · ×1
Unused export 'CredentialsController' packages/agents-desktop/src/credentials/controller.ts:15— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'RuntimeController' · ×1
Unused export 'RuntimeController' packages/agents-desktop/src/runtime/controller.ts:17— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'DEFAULT_MCP_SERVERS' · ×1
Unused export 'DEFAULT_MCP_SERVERS' packages/agents-desktop/src/settings/mcp-defaults.ts:19— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'tokensByScheme' · ×1
Unused export 'tokensByScheme' packages/agents-mobile/src/lib/theme.ts:193— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'useEntityPermission' · ×1
Unused export 'useEntityPermission' packages/agents-mobile/src/lib/useEntityPermissions.ts:38— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'ChildEntityStatus' · ×1
Unused export 'ChildEntityStatus' packages/agents-runtime/src/entity-schema.ts:925— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'WakeChangeEntry' · ×1
Unused export 'WakeChangeEntry' packages/agents-runtime/src/entity-schema.ts:926— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'WakeFinishedChildEntry' · ×1
Unused export 'WakeFinishedChildEntry' packages/agents-runtime/src/entity-schema.ts:927— Nothing imports this binding — it is safe to review for removal.
R8 · Dependency Hygiene· Type-only dependency '@standard-schema/spec' in production deps · ×1
Type-only dependency '@standard-schema/spec' in production deps packages/agents-runtime/src/entity-schema.ts:8— Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene· Test-only dependency '@tanstack/db' in production deps · ×1
Test-only dependency '@tanstack/db' in production deps packages/electric-ax/package.json:54— Only test files import it (first: packages/electric-ax/test/observe-ui.test.tsx:3) — move it to devDependencies.
No security response headers detected packages/sync-service/dev/nginx.conf:20— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `nginx.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
S1 · Web-Security Posture· Information-disclosure response header set · ×1
Information-disclosure response header set packages/agents-desktop/src/state/desktop-state.ts:22— `server` is set explicitly here. The OWASP Secure Headers Project lists it among the response headers to REMOVE: it names the server, framework or tooling behind the application, which is exactly what an attacker looks up known exploits for. (No deduction on this card.)
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 10/39 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 41/42 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) override strict null checking — ~1.4 `!` null assertions per 1k TypeScript source lines — 189 assertion(s) across the 139307 source line(s) of the 556 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/agents-runtime/src/process-wake.ts (16), packages/y-electric/src/y-electric.ts (12), packages/agents-runtime/scripts/bench-build-sections.ts (9). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X7 · Silent fallback defaults· Pending state with no failure state · ×1
Pending state with no failure state packages/agents/skills/quickstart/scaffold-ui/main.tsx:372— The view draws `Waiting for agents to respond...` under `urls && analyserIntro . length === 0`, but `urls` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
Outdated: bandit — `:bandit` is locked at 1.7.0 but 1.15.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.7"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update bandit` and commit the updated REDACTED.
Outdated: bandit — `:bandit` is locked at 1.6.11 but 1.15.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.5"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update bandit` and commit the updated REDACTED.
Outdated: bandit — `:bandit` is locked at 1.12.0 but 1.15.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.6"` requirement declared in packages/sync-service/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update bandit` and commit the updated REDACTED.
Outdated: bandit — `:bandit` is locked at 1.6.0 but 1.15.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.5"` requirement declared in examples/gatekeeper-auth/api/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update bandit` and commit the updated REDACTED.
Outdated: dialyxir — `:dialyxir` is locked at 1.4.7 but 1.4.9 is the current stable release on hex.pm, and it already satisfies the `"~> 1.4"` requirement declared in packages/elixir-client/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update dialyxir` and commit the updated REDACTED.
Outdated: dns_cluster — `:dns_cluster` is locked at 0.2.0 but 0.3.1 is the current stable release on hex.pm, and it already satisfies the `"~> 0.2"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update dns_cluster` and commit the updated REDACTED.
Outdated: dotenvy — `:dotenvy` is locked at 1.1.1 but 1.2.1 is the current stable release on hex.pm, and it already satisfies the `"~> 1.1"` requirement declared in packages/sync-service/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update dotenvy` and commit the updated REDACTED.
Outdated: dotenvy — `:dotenvy` is locked at 1.1.0 but 1.2.1 is the current stable release on hex.pm, and it already satisfies the `"~> 1.1"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update dotenvy` and commit the updated REDACTED.
Outdated: ecto — `:ecto` is locked at 3.14.0 but 3.14.3 is the current stable release on hex.pm, and it already satisfies the `"~> 3.12"` requirement declared in packages/sync-service/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update ecto` and commit the updated REDACTED.
Outdated: ecto_sql — `:ecto_sql` is locked at 3.12.1 but 3.14.0 is the current stable release on hex.pm, and it already satisfies the `"~> 3.10"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update ecto_sql` and commit the updated REDACTED.
Outdated: ecto_sql — `:ecto_sql` is locked at 3.12.1 but 3.14.0 is the current stable release on hex.pm, and it already satisfies the `"~> 3.10"` requirement declared in examples/gatekeeper-auth/api/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update ecto_sql` and commit the updated REDACTED.
Outdated: ecto_sql — `:ecto_sql` is locked at 3.13.2 but 3.14.0 is the current stable release on hex.pm, and it already satisfies the `"~> 3.13"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update ecto_sql` and commit the updated REDACTED.
Outdated: electric_client — `:electric_client` is locked at 0.5.0-beta-1 but 0.10.3 is the current stable release on hex.pm, and it already satisfies the `">= 0.5.0-beta-1"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update electric_client` and commit the updated REDACTED.
Outdated: electric_client — `:electric_client` is locked at 0.2.3-rc-1 but 0.10.3 is the current stable release on hex.pm, and it already satisfies the `">= 0.2.3-rc-1"` requirement declared in examples/gatekeeper-auth/api/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update electric_client` and commit the updated REDACTED.
Outdated: esbuild — `:esbuild` is locked at 0.8.1 but 0.10.1 is the current stable release on hex.pm, and it already satisfies the `"~> 0.8"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update esbuild` and commit the updated REDACTED.
Outdated: ex_doc — `:ex_doc` is locked at 0.40.3 but 0.40.4 is the current stable release on hex.pm, and it already satisfies the `">= 0.0.0"` requirement declared in packages/elixir-client/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update ex_doc` and commit the updated REDACTED.
Outdated: finch — `:finch` is locked at 0.20.0 but 0.24.0 is the current stable release on hex.pm, and it already satisfies the `"~> 0.20"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update finch` and commit the updated REDACTED.
Outdated: floki — `:floki` is locked at 0.38.0 but 0.38.5 is the current stable release on hex.pm, and it already satisfies the `">= 0.38.0"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update floki` and commit the updated REDACTED.
Outdated: floki — `:floki` is locked at 0.37.1 but 0.38.5 is the current stable release on hex.pm, and it already satisfies the `">= 0.30.0"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update floki` and commit the updated REDACTED.
Outdated: jason — `:jason` is locked at 1.4.4 but 1.4.5 is the current stable release on hex.pm, and it already satisfies the `"~> 1.4"` requirement declared in examples/gatekeeper-auth/api/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update jason` and commit the updated REDACTED.
Outdated: jason — `:jason` is locked at 1.4.4 but 1.4.5 is the current stable release on hex.pm, and it already satisfies the `"~> 1.4"` requirement declared in examples/burn/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update jason` and commit the updated REDACTED.
Outdated: jason — `:jason` is locked at 1.4.4 but 1.4.5 is the current stable release on hex.pm, and it already satisfies the `"~> 1.2"` requirement declared in examples/phoenix-liveview/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update jason` and commit the updated REDACTED.
Outdated: joken — `:joken` is locked at 2.6.2 but 2.8.0 is the current stable release on hex.pm, and it already satisfies the `"~> 2.6"` requirement declared in examples/gatekeeper-auth/api/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update joken` and commit the updated REDACTED.
Outdated: nimble_options — `:nimble_options` is locked at 1.1.1 but 1.2.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.1"` requirement declared in packages/elixir-client/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update nimble_options` and commit the updated REDACTED.
Outdated: nimble_options — `:nimble_options` is locked at 1.1.1 but 1.2.0 is the current stable release on hex.pm, and it already satisfies the `"~> 1.1"` requirement declared in packages/sync-service/mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update nimble_options` and commit the updated REDACTED.
Skipped (documented): (unnamed test) packages/agents-runtime/test/sandbox-conformance.test.ts:465— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/agents-runtime/test/sandbox-conformance.test.ts:487— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
doc comments repeat the names packages/typescript-client/test/model-based.test.ts:945— 0 of 23 documented parameters and 1 of 185 summaries in `@electric-sql/client` only repeat the member or parameter name (e.g. "409 with the same handle as the current one." for `Respond409SameHandleCmd`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/y-electric/src/types.ts:59— 0 of 33 documented parameters and 1 of 8 summaries in `@electric-sql/y-electric` only repeat the member or parameter name (e.g. "Options for the ElectricProvider." for `ElectricProviderOptions`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 18 file(s) — `packages/agents-desktop/src/cli/controller.ts`, `packages/agents-desktop/src/ipc/chrome.ts`, `packages/agents-desktop/src/preload.ts`, `packages/agents-runtime/src/define-entity.ts`, `packages/agents-runtime/src/entity-stream-db.ts`, … (+13 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1e7d1-b22e-707c-af5d-9031b5380f4f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 429 · Warnings: 1271 · Recommendations: 372 · Info: 57 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 04:44 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.