Public report of statelyai/xstate, published 16 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, 16 November 2026, 19:40 UTC · Survey ID cd_681068712c79493d910c8adf17f133ce
statelyai/xstate
Measured 16 November 2026, 19:39 UTC, at code version 8e53990
First survey, so nothing to compare with yet
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 medium codebase: 95,381 lines of product code in 16 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Production Readiness, 31.9
Findings by how serious they are
228 critical1123 serious185 minor
6 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
16 November 2026, 19:39 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 ▸
70of 70 dimensions measured by tools.
1483of 1536 findings point to an exact file and line, so you can open each one in the code. The other 53 concern the repository as a whole, such as missing documentation.
70dimensions across 7 lenses, read from 95,381 lines of product code in 16 projects.
statelyai/xstate is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no logging, tracing or health checks in the code, and it has packages under a licence on your banned list. It scores 46.7 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 31.9, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the seven deprecated dependencies, worth about 8.0 points. Replacing the 14 packages under a banned licence would lift Production Readiness itself, worth about 12.7 points. Raising Production Readiness to 70 would lift the score to about 59.2.
Ninety-three known security holes in the packages the code depends on can be used by attackers. Fourteen packages carry licence risk, and six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, replacing or clearing the banned-licence packages and pinning each tool to an exact version would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code, and setting a waiting period for automatic updates would deal with the automatic dependency update that takes a new release at once. The 105 tests that check nothing need to check the result they produce.
The product code is 95,381 lines, about €180,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 31.9 to 70, the lowest score rated Strong, the score would rise from 46.7 to about 59.2.
Code composition: what the lines of code are
Product code 43%Tests 57%
Rebuild cost: about €180,000 · Estimate
Cost to rebuild
€60,000 to €300,000, for 993 to 3,151 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problem
Low, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 47. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 95,381 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 7 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (7).
Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14).
Raises the score by about 12.7 points · Medium effort · License Compliance
3
Resolve the 539 No assertions finding(s) in Test Quality — start with types.test.ts (217), invoke.test.ts (28), types.test.tsx (27).
Raises the score by about 10.5 points · High effort · Test Quality
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.2 person-years of work. Its weakest lens is Production Readiness, at 31.9 (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 7 Deprecated finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 8.0 points for low effort, because it clears the 7 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
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 21% on every change. The history of the code shows how much it changes: about 221,455 lines over the last 90 days, which is about 898,123 lines a year. At that pace, the extra work comes to an estimated 211.6 to 1269.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
105 modules, with 160 dependencies between them. One loop runs through 8 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 65 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.
core.src.StateNode uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.StateNode, while a change to core.src.StateNode can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.StateNode uses a module listed above it, which is the healthy direction.
core.src.StateNode uses core.src.stateUtils, so a change to core.src.stateUtils can break core.src.StateNode, while a change to core.src.StateNode can't break core.src.stateUtils.
Position
Below the diagonal: core.src.StateNode uses a module listed above it, which is the healthy direction.
12→27 core.src.StateNode uses core.src.typespart of a loop✕
Connections
7 pairs of types, where a type in core.src.StateNode uses a type in core.src.types.
core.src.StateNode uses core.src.types, so a change to core.src.types can break core.src.StateNode, while a change to core.src.StateNode can't break core.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.
core.src.actors.callback uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.actors.callback, while a change to core.src.actors.callback can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.actors.callback uses a module listed above it, which is the healthy direction.
core.src.actors.callback uses core.src.validation_types, so a change to core.src.validation_types can break core.src.actors.callback, while a change to core.src.actors.callback can't break core.src.validation_types.
Position
Below the diagonal: core.src.actors.callback uses a module listed above it, which is the healthy direction.
core.src.actors.logic uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.actors.logic, while a change to core.src.actors.logic can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.actors.logic uses a module listed above it, which is the healthy direction.
core.src.actors.logic uses core.src.validation_types, so a change to core.src.validation_types can break core.src.actors.logic, while a change to core.src.actors.logic can't break core.src.validation_types.
Position
Below the diagonal: core.src.actors.logic uses a module listed above it, which is the healthy direction.
core.src.actors.observable uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.actors.observable, while a change to core.src.actors.observable can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.actors.observable uses a module listed above it, which is the healthy direction.
core.src.actors.observable uses core.src.validation_types, so a change to core.src.validation_types can break core.src.actors.observable, while a change to core.src.actors.observable can't break core.src.validation_types.
Position
Below the diagonal: core.src.actors.observable uses a module listed above it, which is the healthy direction.
core.src.actors.promise uses core.src.validation_types, so a change to core.src.validation_types can break core.src.actors.promise, while a change to core.src.actors.promise can't break core.src.validation_types.
Position
Below the diagonal: core.src.actors.promise uses a module listed above it, which is the healthy direction.
core.src.graph.types uses core.src.fsm, so a change to core.src.fsm can break core.src.graph.types, while a change to core.src.graph.types can't break core.src.fsm.
Position
Below the diagonal: core.src.graph.types uses a module listed above it, which is the healthy direction.
core.src.graph.types uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.graph.types, while a change to core.src.graph.types can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.graph.types uses a module listed above it, which is the healthy direction.
core.src.graph.types uses core.src.graph.simplePaths, so a change to core.src.graph.simplePaths can break core.src.graph.types, while a change to core.src.graph.types can't break core.src.graph.simplePaths.
Position
Below the diagonal: core.src.graph.types uses a module listed above it, which is the healthy direction.
18→27 core.src.inspection uses core.src.typespart of a loop✕
Connections
4 pairs of types, where a type in core.src.inspection uses a type in core.src.types.
core.src.inspection uses core.src.types, so a change to core.src.types can break core.src.inspection, while a change to core.src.inspection can't break core.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.
core.src.setup uses core.src.schema_types, so a change to core.src.schema_types can break core.src.setup, while a change to core.src.setup can't break core.src.schema_types.
Position
Below the diagonal: core.src.setup uses a module listed above it, which is the healthy direction.
core.src.setup uses core.src.typeUtils, so a change to core.src.typeUtils can break core.src.setup, while a change to core.src.setup can't break core.src.typeUtils.
Position
Below the diagonal: core.src.setup uses a module listed above it, which is the healthy direction.
core.src.types_v6 uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.types_v6, while a change to core.src.types_v6 can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.types_v6 uses a module listed above it, which is the healthy direction.
core.src.types_v6 uses core.src.typeUtils, so a change to core.src.typeUtils can break core.src.types_v6, while a change to core.src.types_v6 can't break core.src.typeUtils.
Position
Below the diagonal: core.src.types_v6 uses a module listed above it, which is the healthy direction.
20→27 core.src.types_v6 uses core.src.typespart of a loop✕
Connections
6 pairs of types, where a type in core.src.types_v6 uses a type in core.src.types.
core.src.types_v6 uses core.src.types, so a change to core.src.types can break core.src.types_v6, while a change to core.src.types_v6 can't break core.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.
4 pairs of types, where a type in xstate-codemod.src.transforms.lower-actions.codegen uses a type in xstate-codemod.src.transforms.lower-actions.analysis.
xstate-codemod.src.transforms.lower-actions.codegen uses xstate-codemod.src.transforms.lower-actions.analysis, so a change to xstate-codemod.src.transforms.lower-actions.analysis can break xstate-codemod.src.transforms.lower-actions.codegen, while a change to xstate-codemod.src.transforms.lower-actions.codegen can't break xstate-codemod.src.transforms.lower-actions.analysis.
Position
Below the diagonal: xstate-codemod.src.transforms.lower-actions.codegen uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.fsm, so a change to core.src.fsm can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.fsm.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.stateUtils, so a change to core.src.stateUtils can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.stateUtils.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.validation_types, so a change to core.src.validation_types can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.validation_types.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.StateNode, so a change to core.src.StateNode can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.StateNode.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
core.src.StateMachine uses core.src.types_v6, so a change to core.src.types_v6 can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.types_v6.
Position
Below the diagonal: core.src.StateMachine uses a module listed above it, which is the healthy direction.
22→27 core.src.StateMachine uses core.src.typespart of a loop✕
Connections
4 pairs of types, where a type in core.src.StateMachine uses a type in core.src.types.
core.src.StateMachine uses core.src.types, so a change to core.src.types can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.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.
22→28 core.src.StateMachine uses core.src.Statepart of a loop✕
Connections
1 pair of types, where a type in core.src.StateMachine uses a type in core.src.State.
core.src.StateMachine uses core.src.State, so a change to core.src.State can break core.src.StateMachine, while a change to core.src.StateMachine can't break core.src.State.
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.
core.src.system uses core.src.inspection, so a change to core.src.inspection can break core.src.system, while a change to core.src.system can't break core.src.inspection.
Position
Below the diagonal: core.src.system uses a module listed above it, which is the healthy direction.
23→25 core.src.system uses core.src.createActorpart of a loop✕
Connections
1 pair of types, where a type in core.src.system uses a type in core.src.createActor.
core.src.system uses core.src.createActor, so a change to core.src.createActor can break core.src.system, while a change to core.src.system can't break core.src.createActor.
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.
23→27 core.src.system uses core.src.typespart of a loop✕
Connections
8 pairs of types, where a type in core.src.system uses a type in core.src.types.
core.src.system uses core.src.types, so a change to core.src.types can break core.src.system, while a change to core.src.system can't break core.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.
xstate-codemod.src.transforms.lower-actions uses xstate-codemod.src.transforms.lower-actions.analysis, so a change to xstate-codemod.src.transforms.lower-actions.analysis can break xstate-codemod.src.transforms.lower-actions, while a change to xstate-codemod.src.transforms.lower-actions can't break xstate-codemod.src.transforms.lower-actions.analysis.
Position
Below the diagonal: xstate-codemod.src.transforms.lower-actions uses a module listed above it, which is the healthy direction.
xstate-codemod.src.transforms.lower-actions uses xstate-codemod.src.transforms.lower-actions.codegen, so a change to xstate-codemod.src.transforms.lower-actions.codegen can break xstate-codemod.src.transforms.lower-actions, while a change to xstate-codemod.src.transforms.lower-actions can't break xstate-codemod.src.transforms.lower-actions.codegen.
Position
Below the diagonal: xstate-codemod.src.transforms.lower-actions uses a module listed above it, which is the healthy direction.
core.src.createActor uses core.src.Mailbox, so a change to core.src.Mailbox can break core.src.createActor, while a change to core.src.createActor can't break core.src.Mailbox.
Position
Below the diagonal: core.src.createActor uses a module listed above it, which is the healthy direction.
core.src.createActor uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.createActor, while a change to core.src.createActor can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.createActor uses a module listed above it, which is the healthy direction.
core.src.createActor uses core.src.system, so a change to core.src.system can break core.src.createActor, while a change to core.src.createActor can't break core.src.system.
Position
Below the diagonal: core.src.createActor uses a module listed above it, which is the healthy direction.
25→27 core.src.createActor uses core.src.typespart of a loop✕
Connections
10 pairs of types, where a type in core.src.createActor uses a type in core.src.types.
core.src.createActor uses core.src.types, so a change to core.src.types can break core.src.createActor, while a change to core.src.createActor can't break core.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.
xstate-codemod.src.transforms uses xstate-codemod.src.transforms.lower-actions.analysis, so a change to xstate-codemod.src.transforms.lower-actions.analysis can break xstate-codemod.src.transforms, while a change to xstate-codemod.src.transforms can't break xstate-codemod.src.transforms.lower-actions.analysis.
Position
Below the diagonal: xstate-codemod.src.transforms uses a module listed above it, which is the healthy direction.
xstate-codemod.src.transforms uses xstate-codemod.src.transforms.lower-actions.codegen, so a change to xstate-codemod.src.transforms.lower-actions.codegen can break xstate-codemod.src.transforms, while a change to xstate-codemod.src.transforms can't break xstate-codemod.src.transforms.lower-actions.codegen.
Position
Below the diagonal: xstate-codemod.src.transforms uses a module listed above it, which is the healthy direction.
xstate-codemod.src.transforms uses xstate-codemod.src.transforms.lower-actions, so a change to xstate-codemod.src.transforms.lower-actions can break xstate-codemod.src.transforms, while a change to xstate-codemod.src.transforms can't break xstate-codemod.src.transforms.lower-actions.
Position
Below the diagonal: xstate-codemod.src.transforms uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.types, while a change to core.src.types can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.typeUtils, so a change to core.src.typeUtils can break core.src.types, while a change to core.src.types can't break core.src.typeUtils.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.types_v6, so a change to core.src.types_v6 can break core.src.types, while a change to core.src.types can't break core.src.types_v6.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.StateMachine, so a change to core.src.StateMachine can break core.src.types, while a change to core.src.types can't break core.src.StateMachine.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.system, so a change to core.src.system can break core.src.types, while a change to core.src.types can't break core.src.system.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.types uses core.src.createActor, so a change to core.src.createActor can break core.src.types, while a change to core.src.types can't break core.src.createActor.
Position
Below the diagonal: core.src.types uses a module listed above it, which is the healthy direction.
core.src.State uses core.src.types, so a change to core.src.types can break core.src.State, while a change to core.src.State can't break core.src.types.
Position
Below the diagonal: core.src.State uses a module listed above it, which is the healthy direction.
core.src.actors uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.actors, while a change to core.src.actors can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.actors uses a module listed above it, which is the healthy direction.
core.src.actors uses core.src.actors.logic, so a change to core.src.actors.logic can break core.src.actors, while a change to core.src.actors can't break core.src.actors.logic.
Position
Below the diagonal: core.src.actors uses a module listed above it, which is the healthy direction.
core.src.actors uses core.src.actors.promise, so a change to core.src.actors.promise can break core.src.actors, while a change to core.src.actors can't break core.src.actors.promise.
Position
Below the diagonal: core.src.actors uses a module listed above it, which is the healthy direction.
core.src.actors uses core.src.types, so a change to core.src.types can break core.src.actors, while a change to core.src.actors can't break core.src.types.
Position
Below the diagonal: core.src.actors uses a module listed above it, which is the healthy direction.
core.src.durable uses core.src.effectDescriptor, so a change to core.src.effectDescriptor can break core.src.durable, while a change to core.src.durable can't break core.src.effectDescriptor.
Position
Below the diagonal: core.src.durable uses a module listed above it, which is the healthy direction.
core.src.durable uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.durable, while a change to core.src.durable can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.durable uses a module listed above it, which is the healthy direction.
core.src.durable uses core.src.system, so a change to core.src.system can break core.src.durable, while a change to core.src.durable can't break core.src.system.
Position
Below the diagonal: core.src.durable uses a module listed above it, which is the healthy direction.
core.src.durable uses core.src.types, so a change to core.src.types can break core.src.durable, while a change to core.src.durable can't break core.src.types.
Position
Below the diagonal: core.src.durable uses a module listed above it, which is the healthy direction.
core.src.graph uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src.graph, while a change to core.src.graph can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src.graph uses a module listed above it, which is the healthy direction.
core.src.graph uses core.src.graph.types, so a change to core.src.graph.types can break core.src.graph, while a change to core.src.graph can't break core.src.graph.types.
Position
Below the diagonal: core.src.graph uses a module listed above it, which is the healthy direction.
core.src.graph uses core.src.types, so a change to core.src.types can break core.src.graph, while a change to core.src.graph can't break core.src.types.
Position
Below the diagonal: core.src.graph uses a module listed above it, which is the healthy direction.
core.src.machineFromJSON uses core.src.validation_types, so a change to core.src.validation_types can break core.src.machineFromJSON, while a change to core.src.machineFromJSON can't break core.src.validation_types.
Position
Below the diagonal: core.src.machineFromJSON uses a module listed above it, which is the healthy direction.
core.src.machineFromJSON uses core.src.types, so a change to core.src.types can break core.src.machineFromJSON, while a change to core.src.machineFromJSON can't break core.src.types.
Position
Below the diagonal: core.src.machineFromJSON uses a module listed above it, which is the healthy direction.
xstate-store.src.atom uses core.src.types, so a change to core.src.types can break xstate-store.src.atom, while a change to xstate-store.src.atom can't break core.src.types.
Position
Below the diagonal: xstate-store.src.atom uses a module listed above it, which is the healthy direction.
xstate-store.src.types uses core.src.types, so a change to core.src.types can break xstate-store.src.types, while a change to xstate-store.src.types can't break core.src.types.
Position
Below the diagonal: xstate-store.src.types uses a module listed above it, which is the healthy direction.
xstate-effect.src.effectActor uses core.src.Mailbox, so a change to core.src.Mailbox can break xstate-effect.src.effectActor, while a change to xstate-effect.src.effectActor can't break core.src.Mailbox.
Position
Below the diagonal: xstate-effect.src.effectActor uses a module listed above it, which is the healthy direction.
xstate-effect.src.effectActor uses core.src.graph.types, so a change to core.src.graph.types can break xstate-effect.src.effectActor, while a change to xstate-effect.src.effectActor can't break core.src.graph.types.
Position
Below the diagonal: xstate-effect.src.effectActor uses a module listed above it, which is the healthy direction.
xstate-effect.src.effectActor uses core.src.types, so a change to core.src.types can break xstate-effect.src.effectActor, while a change to xstate-effect.src.effectActor can't break core.src.types.
Position
Below the diagonal: xstate-effect.src.effectActor uses a module listed above it, which is the healthy direction.
xstate-effect.src.effectActor uses xstate-store.src.atom, so a change to xstate-store.src.atom can break xstate-effect.src.effectActor, while a change to xstate-effect.src.effectActor can't break xstate-store.src.atom.
Position
Below the diagonal: xstate-effect.src.effectActor uses a module listed above it, which is the healthy direction.
xstate-scxml.src.runtime uses core.src.types, so a change to core.src.types can break xstate-scxml.src.runtime, while a change to xstate-scxml.src.runtime can't break core.src.types.
Position
Below the diagonal: xstate-scxml.src.runtime uses a module listed above it, which is the healthy direction.
xstate-scxml.src.runtime uses core.src.machineFromJSON, so a change to core.src.machineFromJSON can break xstate-scxml.src.runtime, while a change to xstate-scxml.src.runtime can't break core.src.machineFromJSON.
Position
Below the diagonal: xstate-scxml.src.runtime uses a module listed above it, which is the healthy direction.
xstate-store.src uses core.src.fsm, so a change to core.src.fsm can break xstate-store.src, while a change to xstate-store.src can't break core.src.fsm.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break xstate-store.src, while a change to xstate-store.src can't break core.src.graph.shortestPaths.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses core.src.graph.simplePaths, so a change to core.src.graph.simplePaths can break xstate-store.src, while a change to xstate-store.src can't break core.src.graph.simplePaths.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses core.src.schema_types, so a change to core.src.schema_types can break xstate-store.src, while a change to xstate-store.src can't break core.src.schema_types.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses core.src.types, so a change to core.src.types can break xstate-store.src, while a change to xstate-store.src can't break core.src.types.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses xstate-store.src.atom, so a change to xstate-store.src.atom can break xstate-store.src, while a change to xstate-store.src can't break xstate-store.src.atom.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
xstate-store.src uses xstate-store.src.types, so a change to xstate-store.src.types can break xstate-store.src, while a change to xstate-store.src can't break xstate-store.src.types.
Position
Below the diagonal: xstate-store.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.effectDescriptor, so a change to core.src.effectDescriptor can break core.src, while a change to core.src can't break core.src.effectDescriptor.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.graph.shortestPaths, so a change to core.src.graph.shortestPaths can break core.src, while a change to core.src can't break core.src.graph.shortestPaths.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.graph.simplePaths, so a change to core.src.graph.simplePaths can break core.src, while a change to core.src can't break core.src.graph.simplePaths.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.schema_types, so a change to core.src.schema_types can break core.src, while a change to core.src can't break core.src.schema_types.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.validation_types, so a change to core.src.validation_types can break core.src, while a change to core.src can't break core.src.validation_types.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses core.src.createActor, so a change to core.src.createActor can break core.src, while a change to core.src can't break core.src.createActor.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
64 pairs of types, where a type in core.src uses a type in core.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
core.src uses core.src.machineFromJSON, so a change to core.src.machineFromJSON can break core.src, while a change to core.src can't break core.src.machineFromJSON.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src uses xstate-scxml.src.runtime, so a change to xstate-scxml.src.runtime can break core.src, while a change to core.src can't break xstate-scxml.src.runtime.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.fsm, so a change to core.src.fsm can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.fsm.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.schema_types, so a change to core.src.schema_types can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.schema_types.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.inspection, so a change to core.src.inspection can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.inspection.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.setup, so a change to core.src.setup can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.setup.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.system, so a change to core.src.system can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.system.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses core.src.types, so a change to core.src.types can break xstate-effect.src, while a change to xstate-effect.src can't break core.src.types.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses xstate-store.src.atom, so a change to xstate-store.src.atom can break xstate-effect.src, while a change to xstate-effect.src can't break xstate-store.src.atom.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-effect.src uses xstate-effect.src.effectActor, so a change to xstate-effect.src.effectActor can break xstate-effect.src, while a change to xstate-effect.src can't break xstate-effect.src.effectActor.
Position
Below the diagonal: xstate-effect.src uses a module listed above it, which is the healthy direction.
xstate-scxml.src uses core.src.types, so a change to core.src.types can break xstate-scxml.src, while a change to xstate-scxml.src can't break core.src.types.
Position
Below the diagonal: xstate-scxml.src uses a module listed above it, which is the healthy direction.
xstate-scxml.src uses core.src.machineFromJSON, so a change to core.src.machineFromJSON can break xstate-scxml.src, while a change to xstate-scxml.src can't break core.src.machineFromJSON.
Position
Below the diagonal: xstate-scxml.src uses a module listed above it, which is the healthy direction.
xstate-scxml.src uses xstate-scxml.src.runtime, so a change to xstate-scxml.src.runtime can break xstate-scxml.src, while a change to xstate-scxml.src can't break xstate-scxml.src.runtime.
Position
Below the diagonal: xstate-scxml.src uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 55.6 · Adequate · gated by D1, D2, R3 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
141
High / Critical
A05:2025 — Injection
20
High / Critical
Roadmap
Top priorities: Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14); Resolve the 539 No assertions finding(s) in Test Quality — start with types.test.ts (217), invoke.test.ts (28), types.test.tsx (27); Resolve the 105 No assertions (empty test) finding(s) in Test Quality — start with types.test.ts (61), typeHelpers.test.ts (11), emittedSelf.types.test.ts (6).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 7 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (7).
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Resolve the 105 No assertions (empty test) finding(s) in Test Quality — start with types.test.ts (61), typeHelpers.test.ts (11), emittedSelf.types.test.ts (6).
Test Quality: No assertions (empty test): infers internal-only event payloads with an empty public event map
packages/core/test/emittedSelf.types.test.ts
3.8
Slop
Test Quality: No assertions (empty test): setup retains emitted events across callback types
packages/xstate-store/test/undo.test.ts
4.0
Slop
Test Quality: No assertions (empty test): emit event types should be correct
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
packages/xstate-store/test/types.test.tsx
4.0
Mixed
Test Quality: No assertions (empty test): can't subscribe to a unknown event
packages/core/test/createInvoke.test.ts
4.0
Mixed
Test Quality: No assertions (empty test): checks target arrays and system registry contracts
packages/xstate-store-react/src/types.test.tsx
4.4
Mixed
Test Quality: No assertions (empty test): infers schemas in useStore
REDACTED
4.4
Mixed
Dependency Vulnerabilities: High CVE: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 228
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 — 1123
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 — 185
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 6
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 70 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 — 70 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, 1483 of 1536 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: the JavaScript/TypeScript half could not be measured — the dependency install for the repository root could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
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 for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in examples/effect-workflows/ was NOT MEASURED: the dependency install for examples/effect-workflows/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in examples/model-based-testing/ was NOT MEASURED: the dependency install for examples/model-based-testing/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in examples/property-testing-cart/ was NOT MEASURED: the dependency install for examples/property-testing-cart/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in examples/unit-testing-machines/ was NOT MEASURED: the dependency install for examples/unit-testing-machines/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in packages/xstate-codemod/ was NOT MEASURED: the dependency install for packages/xstate-codemod/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
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 for the vitest suite in packages/xstate-test/ was NOT MEASURED: the dependency install for packages/xstate-test/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-11.8.0.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (packages/xstate-vue/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D23 Boundary Type-Coupling — 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 measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
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.
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/core/src/State.ts`, `packages/core/src/StateMachine.ts`, `packages/core/src/actors/callback.ts`, `packages/core/src/actors/logic.ts`, `packages/core/src/actors/observable.ts`, … (+30 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.
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. A badge or prose version claim scored 9/17 in its adjudication (docs/plans/deterministic-engine/adjudication/M4-v3.md: badges 9/9, prose 0/8, where prose versions are minimums or history), short of the 95 % precision gate, 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. The .NET and Node.js version checks are a different kind and still publish.
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.
P1 CI/CD gates — 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
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. 43 further occurrence(s) are not listed individually; the score already reflects all 83.
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. 145 further occurrence(s) are not listed individually; the score already reflects all 185.
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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 194 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
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.
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.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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 Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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.
+ 66 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with index.createDurable (cyclomatic 123), runtime.createMachineFromSCXMLConfig::executeActions (cyclomatic 117), scxml.toStateNodeJSON (cyclomatic 95). — 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 7 together lifts Cyclomatic Complexity from 2.3 to about 4.3/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.
+ 99 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 60 down to 60 or less in Cognitive Complexity — start with runtime.createMachineFromSCXMLConfig::executeActions (cognitive 301), stateUtils.microstep::enterStates (cognitive 141), scxml.toStateNodeJSON (cognitive 118). — 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 10 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.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.
ClassTooLong: Actor · ×3packages/core/src/createActor.ts:164
TooManyMethods: Actor · ×3packages/core/src/createActor.ts:164
What to do
Resolve the 20 FileTooLong finding(s) in God Classes — start with setup.ts, types.ts, types.v6.ts. — One of this dimension's main actionable groups (20 warning-level).
Resolve the 20 FunctionTooLong finding(s) in God Classes — start with stateUtils.ts (3), REDACTED (2), persist.ts (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 3 MethodTooLong finding(s) in God Classes — start with StateMachine.ts (2), codegen.ts. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
16 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with system.ts, StateMachine.ts, fakePage.ts. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality7.1 / 10Adequategated by 105 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
36 skipped (5 with a documented reason), 644 zero-assertion, 1 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4072 tests.
No assertions (empty test): infers machine property APIs · ×105packages/xstate-test/test/propertyTest.types.test.ts:22
No assertions: keeps the snapshot type in testPaths() results · ×539packages/xstate-test/test/fastCheckWrappers.test.ts:122
Skipped test: only rerenders for selected values · ×31packages/xstate-solid/test/selector.test.tsx:13
Fixed-sleep synchronisation: root-bound events sent while the loop is parked reach the host runtimepackages/core/test/durable-address-first.test.ts:519
Mock-dominated test: defers startup and observer calls until mount, then cleans up on unmount · ×9packages/xstate-vue/test/scope-lifecycle.test.ts:95
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 539 No assertions finding(s) in Test Quality — start with types.test.ts (217), invoke.test.ts (28), types.test.tsx (27). — One of this dimension's main actionable groups (539 warning-level).
Resolve the 105 No assertions (empty test) finding(s) in Test Quality — start with types.test.ts (61), typeHelpers.test.ts (11), emittedSelf.types.test.ts (6). — One of this dimension's main actionable groups (105 issue-level).
Resolve the 31 Skipped test finding(s) in Test Quality — start with actions.test.ts (5), invoke.test.ts (4), actorLogic.test.ts (3). — One of this dimension's main actionable groups (31 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.
45 outdated direct production npm dependency(ies) of 60 graded, 0 pinning defect(s), across 132 package.json (17 of them the product) and 11 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Resolve the 7 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (7). — One of this dimension's main actionable groups (7 recommendation-level).
Resolve the 2 Outdated (npm) finding(s) in Dependency Hygiene — start with package.json (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with package.json. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
14 of 1388 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1388 package(s) this repository's committed lockfile installs for a consumer — its 60 production, optional and peer dependency(ies), across 17 product package.json manifest(s), and everything those install in turn. Its 555 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules). This repository publishes itself under MIT, which is its own choice and is not judged here.
Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14). — One of this dimension's main actionable groups (14 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Top hotspots: packages/core/src/stateUtils.ts (33×147=4851); REDACTED (7×232=1624); packages/core/src/durable/index.ts (12×123=1476) Repeated repair below the complexity floor: packages/core/src/graph/graph.ts (4 of 7 changes were fixes); packages/xstate-store-react/src/index.ts (3 of 4 changes were fixes)
Resolve the 21 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), stateUtils.ts, REDACTED. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with graph.ts, REDACTED. — One of this dimension's main actionable groups (2 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 Factor5.0 / 10Adequate✓ 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.
64 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/xstate-test/src/engine/propertyTest.ts. Counted over 130 of the 242 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
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
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.
67 deducted task-comment markers across 91042 LoC (0.1/KLoC) → score 9.9. 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 67 TodoComment finding(s) in Explicit Debt — start with types.ts (6), actions.test.ts (5), history.test.ts (4). — One of this dimension's main actionable groups (67 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. 128 document(s) read across 17 unit(s).
Documentation: no build, run or usage examplepackages/xstate-codemod/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.
No ADRs foundpackages/xstate-codemod/package.json:15
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json. — 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 domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
3 domain type(s) cross context boundaries across 124 contexts; they are measured and withheld (not published, not scored). Contexts: 7guis-cells-react, 7guis-circles-react, 7guis-counter-react, 7guis-crud-react, 7guis-flight-booker-react, 7guis-temperature-react, 7guis-temperature-vue, 7guis-timer-react, actor-addresses, actor-system, actor-ui, actor-ui-dashboard and 112 more.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
1 of 16 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionpackages/core/package.json:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
2 % of calls cross a namespace and 1 % go through an interface, but 95 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
20 finding(s): 0 critical, 9 high, 11 medium, 0 low. semgrep hit a parse error in 54 file(s) — `examples/agent-human-in-the-loop/src/main.ts` (line 140), `examples/form-validation-react/src/App.tsx` (line 27), `packages/core/src/State.ts` (lines 170–172, lines 194–196, line 331, …), `packages/core/src/StateMachine.ts`, `packages/core/src/actors/callback.ts` (line 217), … (+49 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (6 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 82 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (82). — One of this dimension's main actionable groups (82 issue-level).
Resolve the 9 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
Resolve the 2 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
1 of 130 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/xstate-solid/src/createImmutable.ts. Counted over 130 of the 242 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 26 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels5.3 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has 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. — templates/react-ts/src/App.tsx:77
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×2) — templates/svelte-ts/src/App.svelte:59, templates/vue-ts/src/Feedback.vue:46
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. — templates/react-ts/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="app">, so there is no content here to wrap — render the <main> from the component mounted into it. (×3) — templates/svelte-ts/index.html:2, templates/vanilla-ts/index.html:2, templates/vue-ts/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 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.
`& .error` sets color: white on background-color: red — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/7guis-flight-booker-react/src/styles/styles.css:64
`button` sets color: #f6fcfc on background-color: #acedb4 — 1.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/7guis-counter-vue/src/style.css:69
A styled-components/emotion style declares a foreground/background colour pair below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/trivia-game-example/src/components/styled/Button.tsx:15
`.toast .bar.running` moves (`animation: shrink 4s linear 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. — examples/notifications-react/src/App.css:126
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · 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.
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.
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×32) — packages/core/src/graph/test/graph.test.ts:239, packages/core/src/graph/test/graph.test.ts:245, packages/core/src/graph/test/graph.test.ts:564, …
`unsubscribe` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — packages/core/src/remoteActorRef.ts:12, packages/xstate-effect/src/actor.ts:61
`systemLogger` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/core/src/systemTransition.ts:199
`setItem` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/xstate-store/src/persist.ts:143
`removeItem` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/xstate-store/src/persist.ts:144
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/xstate-vue/README.md names Vue 2, but the manifest declares `vue` ^3.5.29. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, 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/xstate-vue/README.md:10
What to do
Reconcile the README with reality: packages/xstate-vue/README.md names Vue 2, but the manifest declares `vue` ^3.5.29.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step (`pnpm test` for the toolchain this pipeline already uses) and gate merges on it.
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 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging call was found in the 219 JavaScript/TypeScript production file(s) this check read across 20 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
What to do
Adopt pino (or winston) and log at meaningful points in the services you run.
Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
`package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:81
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
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.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Do you agree with this assessment?
P5 · DR & Backup3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
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.
`mkdirSync` in `verifyCli` 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/xstate-codemod/src/verify/cli.ts:199
`writeFileSync` in `verifyCli` 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/xstate-codemod/src/verify/cli.ts:200
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.7 / 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.
31 duplicated blocks under packages/ have copies in at least two of the sibling directories core, xstate-effect, xstate-react, xstate-scxml, xstate-solid, xstate-store (+8 more sibling(s) not listed) — 17 of them are reported below, and 14 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 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 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 31 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/core/src/machineFromJSON.ts:199
packages/core/src/machineFromJSON.ts:199 · REDACTED:379 — the two spans are one implementation copied and then locally edited — 2289 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/core/src/machineFromJSON.ts:199
packages/xstate-effect/src/effectLogic.ts:326 · packages/xstate-effect/src/effectLogic.ts:541 — the two spans are one implementation copied and then locally edited — 461 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/xstate-effect/src/effectLogic.ts:326
packages/xstate-effect/src/effectLogic.ts:505 · packages/xstate-effect/src/effectLogic.ts:643 — the two spans are one implementation copied and then locally edited — 468 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/xstate-effect/src/effectLogic.ts:505
packages/xstate-store-solid/src/index.ts:28 · packages/xstate-store-vue/src/index.ts:22 — the two spans are one implementation copied and then locally edited — 544 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/xstate-store-solid/src/index.ts:28
packages/xstate-store-preact/src/index.ts:139 · packages/xstate-store-react/src/index.ts:45 — the two spans are one implementation copied and then locally edited — 524 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/xstate-store-preact/src/index.ts:139
packages/core/src/createMachine.ts:152 · packages/core/src/createMachine.ts:273 — the two spans are one implementation copied and then locally edited — 338 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/core/src/createMachine.ts:152
packages/core/src/types.ts:932 · packages/core/src/types.ts:1041 — 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. — packages/core/src/types.ts:932
packages/core/src/types.ts:867 · packages/core/src/types.ts:957 · packages/core/src/types.ts:1077 — all 3 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/core/src/types.ts:867
templates/react-ts/src/feedbackMachine.ts:3 · templates/svelte-ts/src/feedbackMachine.ts:3 · templates/vanilla-ts/src/feedbackMachine.ts:3 · templates/vue-ts/src/feedbackMachine.ts:3 — the 4 copies are spread across 4 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. — templates/react-ts/src/feedbackMachine.ts:3
packages/core/src/machineFromJSON.ts:829 · REDACTED:1147 — 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/core/src/machineFromJSON.ts:829
packages/core/src/setup.ts:4888 · packages/core/src/setup.ts:4935 — 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/core/src/setup.ts:4888
packages/core/src/machineFromJSON.ts:894 · REDACTED:1205 — 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/core/src/machineFromJSON.ts:894
packages/xstate-store/src/fromStore.ts:173 · packages/xstate-store/src/fromStore.ts:215 — 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/xstate-store/src/fromStore.ts:173
packages/xstate-codemod/src/verify/recorder5.ts:5 · packages/xstate-codemod/src/verify/recorder6.ts:5 — the two spans are one implementation copied and then locally edited — 208 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/xstate-codemod/src/verify/recorder5.ts:5
packages/core/src/machineFromJSON.ts:121 · REDACTED:299 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/core/src/machineFromJSON.ts:121
packages/core/src/setup.ts:2737 · packages/core/src/setup.ts:2897 — 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. — packages/core/src/setup.ts:2737
packages/core/src/machineFromJSON.ts:769 · REDACTED:814 — 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/core/src/machineFromJSON.ts:769
packages/core/src/setup.ts:2935 · packages/core/src/setup.ts:3052 — 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/core/src/setup.ts:2935
packages/core/src/State.ts:523 · packages/core/src/StateMachine.ts:1124 — the two spans are one implementation copied and then locally edited — 60 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/core/src/State.ts:523
packages/xstate-codemod/src/transforms/report-action-shapes.ts:19 · packages/xstate-codemod/src/transforms/suffixed-lifecycle-events.ts:53 — the two spans are one implementation copied and then locally edited — 241 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/xstate-codemod/src/transforms/report-action-shapes.ts:19
packages/core/src/createActor.ts:752 · packages/xstate-effect/src/effectActor.ts:234 — the two spans are one implementation copied and then locally edited — 148 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/core/src/createActor.ts:752
packages/xstate-react/src/shallowEqual.ts:11 · packages/xstate-store/src/shallowEqual.ts:10 — 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/xstate-react/src/shallowEqual.ts:11
packages/core/src/graph/shortestPaths.ts:23 · packages/core/src/graph/simplePaths.ts:24 — 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/core/src/graph/shortestPaths.ts:23
packages/core/src/devDiagnostics.ts:99 · packages/core/src/devDiagnostics.ts:149 — the two spans are one implementation copied and then locally edited — 76 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/core/src/devDiagnostics.ts:99
packages/xstate-effect/src/effectLogic.ts:613 · packages/xstate-effect/src/effectLogic.ts:752 — 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. — packages/xstate-effect/src/effectLogic.ts:613
packages/xstate-store/src/store.ts:553 · packages/xstate-store/src/store.ts:581 — 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/xstate-store/src/store.ts:553
packages/core/src/StateMachine.ts:639 · packages/core/src/actors/logic.ts:489 — the two spans are one implementation copied and then locally edited — 81 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/core/src/StateMachine.ts:639
packages/core/src/schema.types.ts:112 · packages/xstate-store/src/schema.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/core/src/schema.types.ts:112
packages/core/src/setup.ts:4045 · packages/core/src/setup.ts:4282 — 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/core/src/setup.ts:4045
packages/xstate-store-preact/src/index.ts:94 · packages/xstate-store-solid/src/index.ts:29 · packages/xstate-store-vue/src/index.ts:23 — the 3 copies are spread across 3 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/xstate-store-preact/src/index.ts:94
packages/xstate-effect/src/effectLogic.ts:395 · packages/xstate-effect/src/effectLogic.ts:588 · packages/xstate-effect/src/effectLogic.ts:731 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/xstate-effect/src/effectLogic.ts:395
packages/core/src/setup.ts:940 · packages/core/src/types.v6.ts:2145 — 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/core/src/setup.ts:940
packages/core/src/stateUtils.ts:1560 · packages/core/src/stateUtils.ts:2161 — 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. — packages/core/src/stateUtils.ts:1560
packages/core/src/machineSchemas.ts:32 · packages/core/src/validation/index.ts:374 — 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/core/src/machineSchemas.ts:32
packages/core/src/remoteActorRef.ts:123 · packages/core/src/remoteActorRef.ts:237 — the two spans are one implementation copied and then locally edited — 56 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/core/src/remoteActorRef.ts:123
packages/xstate-solid/src/useMachine.ts:17 · packages/xstate-svelte/src/useMachine.ts:17 — 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/xstate-solid/src/useMachine.ts:17
packages/xstate-store/src/persist.ts:248 · packages/xstate-store/src/persist.ts:281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/xstate-store/src/persist.ts:248
packages/xstate-effect/src/setupEffect.ts:505 · packages/xstate-effect/src/setupEffect.ts:536 — 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/xstate-effect/src/setupEffect.ts:505
packages/core/src/actors/callback.ts:255 · packages/core/src/actors/observable.ts:250 — 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/core/src/actors/callback.ts:255
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.
scripts/typecheck-fixtures/fsm-only-consumer.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../packages/core/src/fsm/index.ts) — 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. — scripts/typecheck-fixtures/fsm-only-consumer.ts:5
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.
executeActions has cyclomatic complexity 123 and cognitive complexity 319; 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:1614
propertyTest has cyclomatic complexity 72 and cognitive complexity 99; 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/xstate-test/src/engine/propertyTest.ts:3432
enqueueActions has cyclomatic complexity 70 and cognitive complexity 95; 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/xstate-codemod/src/transforms/lower-actions/codegen.ts:667
enterStates has cyclomatic complexity 67 and cognitive complexity 152; 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/core/src/stateUtils.ts:1641
validatePersistedSnapshot has cyclomatic complexity 67 and cognitive complexity 103; 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/core/src/persistedSnapshotValidation.ts:102
toStateNodeJSON has cyclomatic complexity 59 and cognitive complexity 87; 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:530
restoreMachineSnapshot has cyclomatic complexity 52 and cognitive complexity 81; 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/core/src/persist/index.ts:171
fromZodDef has cyclomatic complexity 45 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/xstate-test/src/schema.ts:1056
testPaths has cyclomatic complexity 43 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/xstate-test/src/engine/testPaths.ts:605
getZodChecks has cyclomatic complexity 43 and cognitive complexity 25; 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/xstate-test/src/schema.ts:243
zodStringArbitrary has cyclomatic complexity 40 and cognitive complexity 37; 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/xstate-test/src/schema.ts:830
resolveActionsWithContext has cyclomatic complexity 37 and cognitive complexity 70; 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/core/src/transitionActions.ts:1254
mapAction has cyclomatic complexity 37 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. — REDACTED:216
getPersistedSnapshot has cyclomatic complexity 36 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/core/src/State.ts:765
deepEqual has cyclomatic complexity 33 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/xstate-test/src/engine/propertyTest.ts:1064
visitState has cyclomatic complexity 32 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/xstate-codemod/src/transforms/lower-actions.ts:393
visitState has cyclomatic complexity 31 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 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/xstate-codemod/src/transforms/report-action-shapes.ts:118
macrostep has cyclomatic complexity 30 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/core/src/stateUtils.ts:2476
restore has cyclomatic complexity 30 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/src/durable/index.ts:831
replayTest has cyclomatic complexity 30 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/xstate-test/src/engine/propertyTest.ts:4253
creator has cyclomatic complexity 30 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/xstate-codemod/src/transforms/lower-actions/codegen.ts:557
microstep has cyclomatic complexity 28 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/core/src/stateUtils.ts:1379
hotSwapActorLogic has cyclomatic complexity 28 and cognitive complexity 35; 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/core/src/hotSwap.ts:31
checkMetadata has cyclomatic complexity 27 and cognitive complexity 43; 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/xstate-effect/src/persistence.ts:202
verifyCli has cyclomatic complexity 27 and cognitive complexity 42; 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/xstate-codemod/src/verify/cli.ts:110
guard has cyclomatic complexity 26 and cognitive complexity 42; 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/xstate-codemod/src/transforms/lower-actions/codegen.ts:346
checkSnapshot has cyclomatic complexity 26 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/xstate-effect/src/persistence.ts:110
run has cyclomatic complexity 26 and cognitive complexity 34; 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/core/bin/agent.js:178
(anonymous) 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/core/src/createActor.ts:460
resolveStringConstant 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/xstate-codemod/src/transforms/lower-actions/analysis.ts:319
settleSources has cyclomatic complexity 25 and cognitive complexity 59; 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/xstate-store/src/atom.ts:58
assertStateNode has cyclomatic complexity 25 and cognitive complexity 30; 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/core/src/machineFromJSON.ts:678
checkStateNode has cyclomatic complexity 24 and cognitive complexity 42; 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/core/src/devDiagnostics.ts:174
checkTemporal has cyclomatic complexity 24 and cognitive complexity 42; 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/xstate-test/src/engine/propertyTest.ts:2387
main has cyclomatic complexity 24 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 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/xstate-codemod/src/cli.ts:112
checkJson has cyclomatic complexity 24 and cognitive complexity 30; 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/xstate-effect/src/persistence.ts:43
assertStateNode has cyclomatic complexity 24 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. — REDACTED:733
planMachines has cyclomatic complexity 23 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/xstate-codemod/src/transforms/lower-actions.ts:248
evaluateExpr has cyclomatic complexity 23 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 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:897
run has cyclomatic complexity 22 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/xstate-test/src/engine/testPaths.ts:421
Do you agree with this assessment?
R3 · Large Files2.5 / 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/core/src/setup.ts has 5460 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/core/src/setup.ts:1
packages/xstate-test/src/engine/propertyTest.ts has 4516 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/xstate-test/src/engine/propertyTest.ts:1
packages/core/src/types.ts has 3405 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/core/src/types.ts:1
packages/core/src/stateUtils.ts has 2848 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/core/src/stateUtils.ts:1
packages/core/src/types.v6.ts has 2521 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/core/src/types.v6.ts:1
REDACTED has 2443 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/core/src/createActor.ts has 1357 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/core/src/createActor.ts:1
packages/xstate-test/src/schema.ts has 1330 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/xstate-test/src/schema.ts:1
packages/core/src/StateMachine.ts has 1326 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/core/src/StateMachine.ts:1
packages/core/src/transitionActions.ts has 1325 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/core/src/transitionActions.ts:1
packages/xstate-codemod/src/transforms/lower-actions/codegen.ts has 1319 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/xstate-codemod/src/transforms/lower-actions/codegen.ts:1
packages/core/src/machineFromJSON.ts has 1257 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/core/src/machineFromJSON.ts:1
packages/core/src/systemTransition.ts has 1194 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/core/src/systemTransition.ts:1
packages/xstate-test/src/engine/coverage.ts has 1134 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/xstate-test/src/engine/coverage.ts:1
packages/core/src/system.ts has 1104 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/core/src/system.ts:1
packages/core/src/durable/index.ts has 1044 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/core/src/durable/index.ts:1
packages/xstate-store/src/persist.ts has 1013 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/xstate-store/src/persist.ts:1
packages/xstate-test/src/engine/testPaths.ts has 997 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/xstate-test/src/engine/testPaths.ts:1
packages/core/src/State.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/core/src/State.ts:1
REDACTED has 975 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/xstate-test/src/engine/report.ts has 890 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/xstate-test/src/engine/report.ts:1
packages/xstate-store/src/store.ts has 807 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/xstate-store/src/store.ts:1
packages/xstate-effect/src/effectLogic.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/xstate-effect/src/effectLogic.ts:1
packages/core/src/StateNode.ts 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/core/src/StateNode.ts:1
packages/xstate-codemod/src/transforms/lower-actions.ts has 718 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/xstate-codemod/src/transforms/lower-actions.ts:1
packages/xstate-store/src/types.ts has 714 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/xstate-store/src/types.ts:1
packages/xstate-test/src/playwright.ts has 646 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/xstate-test/src/playwright.ts:1
packages/xstate-codemod/src/transforms/lower-actions/analysis.ts has 638 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/xstate-codemod/src/transforms/lower-actions/analysis.ts:1
packages/xstate-store/src/atom.ts has 629 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/xstate-store/src/atom.ts:1
packages/xstate-store/src/alien.ts has 600 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/xstate-store/src/alien.ts:1
packages/core/src/actors/observable.ts has 559 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/core/src/actors/observable.ts:1
packages/xstate-effect/src/setupEffect.ts has 554 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/xstate-effect/src/setupEffect.ts:1
packages/core/src/actors/logic.ts has 551 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/core/src/actors/logic.ts:1
packages/core/src/actors/promise.ts has 545 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/core/src/actors/promise.ts:1
packages/core/src/machineVersions.ts has 528 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/core/src/machineVersions.ts:1
packages/core/src/persist/index.ts has 502 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/core/src/persist/index.ts:1
packages/xstate-test/src/adapter.ts has 489 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/xstate-test/src/adapter.ts:1
packages/core/src/fsm.ts has 488 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/core/src/fsm.ts:1
packages/xstate-effect/src/createEffectActor.ts has 466 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/xstate-effect/src/createEffectActor.ts:1
packages/core/src/utils.ts has 464 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/core/src/utils.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.0 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×18) — templates/react-ts/src/App.tsx:1, templates/react-ts/src/feedbackMachine.ts:1, templates/svelte-ts/src/feedbackMachine.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
The package in `examples/store-counter-react` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `examples/store-counter-react` (or the workspace's task runner). — examples/store-counter-react/package.json:9
The package in `examples/store-tic-tac-toe` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `examples/store-tic-tac-toe` (or the workspace's task runner). — examples/store-tic-tac-toe/package.json:9
Do you agree with this assessment?
R7 · Dead Code9.1 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
75 file(s) (~10072 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/xstate-codemod/bin/codemod.js imports '../dist/xstate-codemod.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — packages/xstate-codemod
6 file(s) (~4107 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/xstate-solid/test
12 file(s) (~414 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/xstate-svelte/test
Unreachable from the 178 application, 40 tooling and 416 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 (178 application, 40 tooling, 416 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 (×2) — scripts/check-built-types.mjs, scripts/release.js
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/xstate-codemod/src/verify/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/xstate-codemod/src/verify/index.ts in the same commit, or the barrel will import a name that no longer exists. — packages/xstate-codemod/src/verify/child.ts:197
Nothing imports this binding — it is safe to review for removal. (×12) — packages/xstate-store/src/alien.ts:367, packages/xstate-store/src/alien.ts:377, packages/xstate-store/src/alien.ts:381, …
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/xstate-store/src/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/xstate-store/src/index.ts in the same commit, or the barrel will import a name that no longer exists. — packages/xstate-store/src/shallowEqual.ts:10
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×4) — packages/core/src/createMachine.ts:81, packages/core/test/conversion.test.ts:6, packages/core/test/publicTypes.types.test.ts:5, …
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 package.json — installs work only by hoisting accident. — scripts/type-error-fixtures/eventNameTypo.ts:5
Declared in the root 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) — package.json:93, package.json:99
Declared in templates/svelte-ts/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. — templates/svelte-ts/package.json:17
Only test files import it (first: packages/xstate-codemod/test/lower-actions.test.ts:3) — move it to devDependencies. — packages/xstate-codemod/package.json:39
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 Imports3.9 / 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.
packages/core/src/State.ts → packages/core/src/stateUtils.ts → packages/core/src/State.ts (one verified cycle inside a mutually-dependent group of 10 files) — packages/core/src/State.ts:5
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · 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.5 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`freezeContext` is exported and takes `value: any` from its caller, and it calls itself at line 86 (`freezeContext`) with a piece of `value` — and nowhere in `freezeContext` 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 `freezeContext` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/State.ts:86
`getPersistedSnapshot` is exported, takes a document from its caller (line 765) and hands it to `persistContext`, which calls itself at line 1017 (`persistContext`) with a piece of `contextPart` — and nowhere in `persistContext` 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 `persistContext` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/State.ts:1017
`diagnoseAuthorConfig` is exported, takes a document from its caller (line 234) and hands it to `checkStateNode`, which calls itself at line 221 (`checkStateNode`) with a piece of `node` — and nowhere in `checkStateNode` 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 `checkStateNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/devDiagnostics.ts:221
`findNonJsonPath` is exported, takes a document from its caller (line 7) and hands it to `visit`, which calls itself at line 51 (`visit`) with a piece of `current` — and nowhere in `visit` 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 `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/persistedSnapshotFormat.ts:51
`validatePersistedSnapshot` is exported, takes a document from its caller (line 102) and hands it to `validatePersistedStateValue`, which calls itself at line 92 (`validatePersistedStateValue`) with a piece of `stateValue` — and nowhere in `validatePersistedStateValue` 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 `validatePersistedStateValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/persistedSnapshotValidation.ts:92
`machineConfigToJSON` is exported, takes a document from its caller (line 324) and hands it to `valueToJSON`, which calls itself at line 212 (`valueToJSON`) with a piece of `value` (and at line 225) — and nowhere in `valueToJSON` 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 `valueToJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/serialize.ts:212
`machineConfigToJSON` is exported, takes a document from its caller (line 324) and hands it to `stateNodeConfigToJSON`, which calls itself at line 308 (`stateNodeConfigToJSON`) with a piece of `config` — and nowhere in `stateNodeConfigToJSON` 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 `stateNodeConfigToJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/serialize.ts:308
`getStateNodes` is exported and takes `stateValue: StateValue` from its caller, and it calls itself at line 908 (`getStateNodes`) with a piece of `stateValue` — and nowhere in `getStateNodes` 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 `getStateNodes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/stateUtils.ts:908
`transitionNode` is exported and takes `stateValue: StateValue` from its caller, and it calls itself at line 971 (`transitionNode`) with a piece of `stateValue` (and at line 997) — and nowhere in `transitionNode` 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 `transitionNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/stateUtils.ts:971
`matchesState` is exported and takes `parentStateId: StateValue` from its caller, and it calls itself at line 53 (`matchesState`) with a piece of `parentStateId` — and nowhere in `matchesState` 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 `matchesState` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/utils.ts:53
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 `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 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.
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. (×9) — packages/xstate-store/src/atom.ts:270, packages/xstate-store/src/persist.ts:875, packages/xstate-store/src/persist.ts:888, …
`.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. (×6) — packages/xstate-store/src/persist.ts:871, packages/xstate-store/src/persist.ts:884, packages/xstate-store/src/store.ts:58, …
`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/core/src/State.ts:79
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 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.
130/137 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.
~3.4 `!` null assertions per 1k TypeScript source lines — 213 assertion(s) across the 61757 source line(s) of the 192 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: REDACTED (28), packages/core/src/stateUtils.ts (17), packages/core/src/transitionActions.ts (15). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 57 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: Angular's root injector cannot see a component-level provider, so a root service asking for one fails with NullInjectorError instead of capturing it.
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. 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).
AX4 Dependency direction — not applicable to a transaction-script/CRUD architecture (the inward-dependency rule is for layered/clean styles)
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): package.json has no "dev" script, so `npm run dev` could not start the app. Last output: "npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. The cause is in the repository, not in our sandbox: package.json has no "dev" script, so `npm run dev` could not start the app. Nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 35 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
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 — JavaScript/TypeScript suite
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 domain event(s); its domain events are published by services or handlers — no domain entity raises one)
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, 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.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — Not assessed: 194 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — 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. 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: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 228 finding(s)
D10 · Test Quality· No assertions (empty test) · ×105
No assertions (empty test): infers machine property APIs packages/xstate-test/test/propertyTest.types.test.ts:22— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): passes for a SUT that commits before resolving packages/xstate-test/test/scheduler.test.ts:112— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in useStore packages/xstate-store-vue/src/types.test.ts:64— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in useStore packages/xstate-store-svelte/src/types.test.ts:5— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in useStore packages/xstate-store-solid/src/types.test.ts:64— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in useStore packages/xstate-store-react/src/types.test.tsx:110— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in createStoreHook packages/xstate-store-react/src/types.test.tsx:195— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers schemas in useStore packages/xstate-store-preact/src/types.test.ts:64— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): accepts an existing atom subscription without a cleanup adapter packages/xstate-store/test/sourceAtom.types.test.ts:35— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): rejects writes, incompatible consumers, and invalid subscriptions packages/xstate-store/test/sourceAtom.types.test.ts:46— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): accepts a cleanup function while keeping the public subscription object-only packages/xstate-store/test/sourceAtom.types.test.ts:75— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): can't subscribe to a unknown event packages/xstate-store/test/types.test.tsx:87— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): preserves inferred event types when only emitted schemas are declared packages/xstate-store/test/types.test.tsx:427— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): emit event types should be correct packages/xstate-store/test/undo.test.ts:545— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): (unnamed test) packages/xstate-scxml/test/scxml.test.ts:570— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): spawned actors should be typed correctly packages/xstate-react/test/types.test.tsx:62— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): infers internal-only event payloads with an empty public event map packages/xstate-effect/src/actionInference.types.test.ts:66— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): preserves annotated arguments and their individual service requirements packages/xstate-effect/src/actionInference.types.test.ts:252— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): rejects non-Effect declared actions packages/xstate-effect/src/actionInference.types.test.ts:307— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): tracks services introduced and replaced by provided actions packages/xstate-effect/src/requirements.types.test.ts:75— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): checks target arrays and system registry contracts packages/core/test/createInvoke.test.ts:507— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): types errors, snapshots and context mappers from the source logic packages/core/test/createInvoke.test.ts:595— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): setup retains emitted events across callback types packages/core/test/emittedSelf.types.test.ts:44— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): createMachine retains emitted events across callback types packages/core/test/emittedSelf.types.test.ts:137— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): types self without a declared context schema packages/core/test/emittedSelf.types.test.ts:232— Test method has an empty body — it asserts nothing and exercises no code.
Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:5194— `@img/sharp-libvips-darwin-arm64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-darwin-x64 REDACTED:5204— `@img/sharp-libvips-darwin-x64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm REDACTED:5227— `@img/sharp-libvips-linux-arm` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm64 REDACTED:5215— `@img/sharp-libvips-linux-arm64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:5239— `@img/sharp-libvips-linux-ppc64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:5251— `@img/sharp-libvips-linux-riscv64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-s390x REDACTED:5263— `@img/sharp-libvips-linux-s390x` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-x64 REDACTED:5275— `@img/sharp-libvips-linux-x64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:5287— `@img/sharp-libvips-linuxmusl-arm64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:5299— `@img/sharp-libvips-linuxmusl-x64` 1.3.3 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-wasm32 REDACTED:5421— `@img/sharp-wasm32` 0.35.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-arm64 REDACTED:5441— `@img/sharp-win32-arm64` 0.35.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-ia32 REDACTED:5453— `@img/sharp-win32-ia32` 0.35.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-x64 REDACTED:5465— `@img/sharp-win32-x64` 0.35.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
AC2 · Forms & labels· <textarea> without a programmatic label · ×3
<textarea> without a programmatic label templates/react-ts/src/App.tsx:77— 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.
<textarea> without a programmatic label templates/svelte-ts/src/App.svelte:59— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label templates/vue-ts/src/Feedback.vue:46— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
Unlisted import 'zod' scripts/type-error-fixtures/eventNameTypo.ts:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
No assertions: keeps the snapshot type in testPaths() results packages/xstate-test/test/fastCheckWrappers.test.ts:122— 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: suggests state-value keys for `states` packages/xstate-test/test/fastCheckWrappers.test.ts:132— 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: keeps the trace typed after `instanceof` packages/xstate-test/test/fastCheckWrappers.test.ts:140— 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: infers the snapshot and checks the payload of pick() packages/xstate-test/test/pick.types.test.ts:16— 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: types the resolved descriptor packages/xstate-test/test/pick.types.test.ts:60— 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: accepts a real Playwright page packages/xstate-test/test/playwrightPage.types.test.ts:10— 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: accepts route registrations returned from mocks packages/xstate-test/test/playwrightPage.types.test.ts:16— 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: accepts testInfo and test.step packages/xstate-test/test/playwrightPage.types.test.ts:22— 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: `testPaths()` accepts fast-check arbitraries in `events` packages/xstate-test/test/propertyTest.types.test.ts:119— 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: uses atom config input in useAtomState packages/xstate-store-vue/src/types.test.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: uses atom config input in useAtomState packages/xstate-store-solid/src/types.test.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: uses atom config input in useAtomState packages/xstate-store-react/src/types.test.tsx:13— 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: uses store logic input in useStore packages/xstate-store-react/src/types.test.tsx:66— 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: preserves inferred events when only emitted schemas are declared in useStore packages/xstate-store-react/src/types.test.tsx:163— 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: uses atom config input in useAtomState packages/xstate-store-preact/src/types.test.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: combined atom getters accept only prev as an argument packages/xstate-store/test/atom.test.ts:343— 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: Atom-specific properties should not be exposed packages/xstate-store/test/atom.test.ts:555— 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: infers snapshot, observer, comparator, and derived value types packages/xstate-store/test/sourceAtom.types.test.ts:8— 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: events can be emitted with optional payloads (type check) packages/xstate-store/test/store.test.ts:422— 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 provide type safety for event payloads packages/xstate-store/test/store.test.ts:901— 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: works with typestates packages/xstate-store/test/store.test.ts:1010— 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: AnyStoreConfig packages/xstate-store/test/store.test.ts:1400— 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: EventFromStoreConfig packages/xstate-store/test/store.test.ts:1414— 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: ContextFromStoreConfig packages/xstate-store/test/store.test.ts:1436— 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: generics can be provided packages/xstate-store/test/store.test.ts:1454— 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.
TodoComment packages/xstate-test/test/engine/testPaths.test.ts:317— // TODO(v7): remove. 6.0.0-beta.1 fixtures wrote `$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/xstate-test/src/engine/propertyTest.ts:2776— // TODO(v7): drop `$error`, written by 6.0.0-beta.1 fixtures. — 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/xstate-store/test/undo.test.ts:554— // TODO: figure out why we need _: {} and not just _ — 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/xstate-solid/test/selector.test.tsx:12— // TODO: rewrite this test to not use `from()` — 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/xstate-solid/test/selector.test.tsx:79— // TODO: rewrite this test to not use `from()` — 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/xstate-scxml/test/scxml.test.ts:207— // 'test298.txml', // TODO: evaluate <donedata> before done.state so error.execution wins — 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/xstate-scxml/test/scxml.test.ts:239— // 'test343.txml', // TODO: evaluate <donedata> before done.state so error.execution wins — 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/xstate-scxml/test/scxml.test.ts:311— // 'test528.txml', // TODO: evaluate <donedata> before done.state so error.execution wins — 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/xstate-react/src/createActorContext.ts:53— // TODO: add properties to actor ref to make more descriptive — 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/xstate-react/src/useActorRef.ts:65— // TODO: consider using `useAsapEffect` that would do this in `useInsertionEffect` is that's available — 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/core/test/actions.test.ts:1757— // TODO: determine if the sendParent action should execute when the child actor is stopped. — 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/core/test/actions.test.ts:1900— // TODO: figure out order of entry/invoke actions, maybe add defer? — 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/core/test/actions.test.ts:2286— // TODO: specify which actions other actions came from — 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/core/test/actions.test.ts:3535— // TODO: need to fix stale value problem — 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/core/test/actions.test.ts:3571— // TODO: stale closure? — 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/core/test/activities.test.ts:4— // TODO: remove this file but before doing that ensure that things tested here are covered by other tests — 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/core/test/actor.test.ts:940— // TODO: this causes parentMachine to be any — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/core/test/actor.test.ts:1153— // expect(createActor(nullActorMachine).getSnapshot().context.ref!.id).toBe('null'); // TODO: identify null actors — 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/core/test/actorLogic.test.ts:1130— // TODO: event sourcing — 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/core/test/actorLogic.test.ts:1239— // TODO: event sourcing — 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/core/test/emit.test.ts:507— // TODO: event sourcing — 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/core/test/interpreter.test.ts:621— // TODO: event sourcing — 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/core/test/after.test.ts:479— // TODO: figure out correct behavior for restoring delayed transitions — 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/core/test/history.test.ts:220— // TODO: investigate why enq(actual.push, 'a2 entered') throws — 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/core/test/history.test.ts:414— // TODO: discuss - the workaround is that the entry action should be — 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.
Skipped test: only rerenders for selected values packages/xstate-solid/test/selector.test.tsx:13— Skipped — switched off by it.skip
Skipped test: should work with a custom comparison function packages/xstate-solid/test/selector.test.tsx:80— Skipped — switched off by it.skip
Skipped test: sent events from exit handlers of a stopped child should not be received by the parent packages/core/test/actions.test.ts:1760— Skipped — switched off by it.skip
Skipped test: sent events from exit handlers of a done child should be received by its children packages/core/test/actions.test.ts:1901— Skipped — switched off by it.skip
Skipped test: should execute exit actions of the settled state of the last initiated microstep packages/core/test/actions.test.ts:2040— Skipped — switched off by it.skip
Skipped test: should not cause an infinite loop when forwarding to undefined packages/core/test/actions.test.ts:2588— Skipped — switched off by it.skip
Skipped test: should not attempt to deliver a delayed event to the invoked actor's ID that was stopped since the event was scheduled packages/core/test/actions.test.ts:3536— Skipped — switched off by it.skip
Skipped test: should not reuse the same signal for different actors with same logic and id packages/core/test/actorLogic.test.ts:766— Skipped — switched off by it.skip
Skipped test: should persist the input of a callback packages/core/test/actorLogic.test.ts:1131— Skipped — switched off by it.skip
Skipped test: should persist a spawned actor with referenced src packages/core/test/actorLogic.test.ts:1404— Skipped — switched off by it.skip
Skipped test: should execute an after transition after starting from a state resolved using `.getPersistedSnapshot` packages/core/test/after.test.ts:480— Skipped — switched off by it.skip
Skipped test: events can be emitted from callback logic (restored root) packages/core/test/emit.test.ts:508— Skipped — switched off by it.skip
Skipped test: should allow a matching transition packages/core/test/guards.test.ts:637— Skipped — switched off by it.skip
Skipped test: should check guards with interim states packages/core/test/guards.test.ts:694— Skipped — switched off by it.skip
Skipped test: should not execute actions of the initial transition when a history state with a default target is targeted and its parent state was never visited yet packages/core/test/history.test.ts:416— Skipped — switched off by it.skip
Skipped test: should execute parent entry actions when recorded history is restored packages/core/test/history.test.ts:517— Skipped — switched off by it.skip
Skipped test: should not execute actions of the initial transition when a history state with a default target is targeted and its parent state was already visited packages/core/test/history.test.ts:560— Skipped — switched off by it.skip
Skipped test: should restart activities from a compound state packages/core/test/interpreter.test.ts:622— Skipped — switched off by it.skip
Skipped test: state.children should reference spawned actors packages/core/test/interpreter.test.ts:1900— Skipped — switched off by it.skip
Skipped test: stopped spawned actors should be cleaned up in parent packages/core/test/interpreter.test.ts:1932— Skipped — switched off by it.skip
Skipped test: should use the service overwritten by .provide(...) packages/core/test/invoke.test.ts:442— Skipped — switched off by it.skip
Skipped test: should communicate with the child machine (invoke on machine) packages/core/test/invoke.test.ts:517— Skipped — switched off by it.skip
Skipped test: should invoke an actor when reentering invoking state within a single macrostep packages/core/test/invoke.test.ts:3180— Skipped — switched off by it.skip
Skipped test: should be able to receive a delayed event sent by the entry action of the invoking state packages/core/test/invoke.test.ts:3719— Skipped — switched off by it.skip
Skipped test: should create invoke based on context updated by entry actions of the same state packages/core/test/predictableExec.test.ts:381— Skipped — switched off by it.skip
+ 6 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×27
Hotspot: packages/core/src/stateUtils.ts packages/core/src/stateUtils.ts:1379— packages/core/src/stateUtils.ts changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 147 in stateUtils.microstep at line 1379. 15 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/stateUtils.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: REDACTED REDACTED:1124— REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 232 in runtime.createMachineFromSCXMLConfig at line 1124. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- REDACTED`: 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/core/src/durable/index.ts packages/core/src/durable/index.ts:401— packages/core/src/durable/index.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in index.createDurable at line 401. 4 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/durable/index.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/core/src/transitionActions.ts packages/core/src/transitionActions.ts:1254— packages/core/src/transitionActions.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in transitionActions.resolveActionsWithContext at line 1254. 5 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/transitionActions.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/core/src/machineFromJSON.ts packages/core/src/machineFromJSON.ts:806— packages/core/src/machineFromJSON.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in machineFromJSON.machineFromJSON at line 806. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/machineFromJSON.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/core/src/createActor.ts packages/core/src/createActor.ts:863— packages/core/src/createActor.ts changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Actor._start at line 863. 6 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/createActor.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/core/src/State.ts packages/core/src/State.ts:765— packages/core/src/State.ts changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in State.getPersistedSnapshot at line 765. 5 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/State.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/xstate-effect/src/createEffectActor.ts packages/xstate-effect/src/createEffectActor.ts:94— packages/xstate-effect/src/createEffectActor.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in createEffectActor.createEffectActor at line 94. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-effect/src/createEffectActor.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/core/src/StateNode.ts packages/core/src/StateNode.ts:164— packages/core/src/StateNode.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in StateNode.constructor at line 164. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/StateNode.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/core/src/actors/logic.ts packages/core/src/actors/logic.ts:315— packages/core/src/actors/logic.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in logic.createStepLogic at line 315. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/actors/logic.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/core/src/devDiagnostics.ts packages/core/src/devDiagnostics.ts:174— packages/core/src/devDiagnostics.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in devDiagnostics.checkStateNode at line 174. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/devDiagnostics.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/core/src/persist/index.ts packages/core/src/persist/index.ts:171— packages/core/src/persist/index.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in index.restoreMachineSnapshot at line 171. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/persist/index.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/xstate-test/src/engine/testPaths.ts packages/xstate-test/src/engine/testPaths.ts:605— packages/xstate-test/src/engine/testPaths.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in testPaths.testPaths at line 605. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-test/src/engine/testPaths.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/core/src/systemTransition.ts packages/core/src/systemTransition.ts:466— packages/core/src/systemTransition.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in SystemReduction.relayAttachments at line 466. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/systemTransition.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/core/src/effectDescriptor.ts packages/core/src/effectDescriptor.ts:132— packages/core/src/effectDescriptor.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in effectDescriptor.describeExecutableEffect at line 132. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/effectDescriptor.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/xstate-store/src/atom.ts packages/xstate-store/src/atom.ts:310— packages/xstate-store/src/atom.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in atom.createAtom at line 310. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-store/src/atom.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/core/src/graph/pathFromEvents.ts packages/core/src/graph/pathFromEvents.ts:15— packages/core/src/graph/pathFromEvents.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in pathFromEvents.getPathsFromEvents at line 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/graph/pathFromEvents.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/core/src/inertActorScope.ts packages/core/src/inertActorScope.ts:234— packages/core/src/inertActorScope.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in inertActorScope.createInertActorScope at line 234. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/inertActorScope.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/xstate-store/src/persist.ts packages/xstate-store/src/persist.ts:509— packages/xstate-store/src/persist.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in persist.persistEventFromLogic at line 509. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-store/src/persist.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/core/src/hotSwap.ts packages/core/src/hotSwap.ts:31— packages/core/src/hotSwap.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in hotSwap.hotSwapActorLogic at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/hotSwap.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/xstate-codemod/src/verify/normalize.ts packages/xstate-codemod/src/verify/normalize.ts:31— packages/xstate-codemod/src/verify/normalize.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in normalize.toJson at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-codemod/src/verify/normalize.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.
FileTooLong: src/setup.ts packages/core/src/setup.ts— FileTooLong — 5007 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4507 over it, 10.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/types.ts packages/core/src/types.ts— FileTooLong — 2546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2046 over it, 5.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/types.v6.ts packages/core/src/types.v6.ts— FileTooLong — 2160 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1660 over it, 4.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: src/stateUtils.ts packages/core/src/stateUtils.ts— FileTooLong — 2124 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1624 over it, 4.25× 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 — 1924 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1424 over it, 3.85× 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/StateMachine.ts packages/core/src/StateMachine.ts— FileTooLong — 1024 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: StateMachine (258-1401). The bar is 500 significant lines; this is 524 over it, 2.05× 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: lower-actions/codegen.ts packages/xstate-codemod/src/transforms/lower-actions/codegen.ts— FileTooLong — 1004 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 504 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/machineFromJSON.ts packages/core/src/machineFromJSON.ts— FileTooLong — 987 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 487 over it, 1.97× 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/transitionActions.ts packages/core/src/transitionActions.ts— FileTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 469 over it, 1.94× 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/systemTransition.ts packages/core/src/systemTransition.ts— FileTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded). 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: src/createActor.ts packages/core/src/createActor.ts— FileTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: Actor (164-1394). The bar is 500 significant lines; this is 348 over it, 1.70× 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/State.ts packages/core/src/State.ts— FileTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 262 over it, 1.52× 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 — 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49× 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/system.ts packages/core/src/system.ts— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 205 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/store.ts packages/xstate-store/src/store.ts— FileTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 149 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/persist.ts packages/xstate-store/src/persist.ts— FileTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 128 over it, 1.26× 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: durable/index.ts packages/core/src/durable/index.ts— FileTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: createDurable (401-1084). The bar is 500 significant lines; this is 118 over it, 1.24× 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/effectLogic.ts packages/xstate-effect/src/effectLogic.ts— FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 69 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: transforms/lower-actions.ts packages/xstate-codemod/src/transforms/lower-actions.ts— FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 64 over it, 1.13× 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/StateNode.ts packages/core/src/StateNode.ts— FileTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 58 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FunctionTooLong: stateUtils.microstep packages/core/src/stateUtils.ts:1379— FunctionTooLong — microstep runs 633 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 533 over it, 6.33× 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: index.createDurable packages/core/src/durable/index.ts:401— FunctionTooLong — createDurable runs 449 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 349 over it, 4.49× 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: createEffectActor.createEffectActor packages/xstate-effect/src/createEffectActor.ts:94— FunctionTooLong — createEffectActor runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.restoreMachineSnapshot packages/core/src/persist/index.ts:171— FunctionTooLong — restoreMachineSnapshot runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× 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: lower-actions.planMachines packages/xstate-codemod/src/transforms/lower-actions.ts:248— FunctionTooLong — planMachines runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: stateUtils.macrostep packages/core/src/stateUtils.ts:2476— FunctionTooLong — macrostep runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× 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: alien.createReactiveSystem packages/xstate-store/src/alien.ts:38— FunctionTooLong — createReactiveSystem runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: machineFromJSON.assertMachineJSON packages/core/src/machineFromJSON.ts:535— FunctionTooLong — assertMachineJSON runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× 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: machineVersions.machineVersions packages/core/src/machineVersions.ts:314— FunctionTooLong — machineVersions runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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: StateNode.formatTransitions packages/core/src/StateNode.ts:493— FunctionTooLong — formatTransitions runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: persist.persistEventFromLogic packages/xstate-store/src/persist.ts:509— FunctionTooLong — persistEventFromLogic runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: runtime.assertMachineJSON REDACTED:630— FunctionTooLong — assertMachineJSON runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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: scxml.mapAction REDACTED:216— FunctionTooLong — mapAction runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× 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: State.getPersistedSnapshot packages/core/src/State.ts:765— FunctionTooLong — getPersistedSnapshot runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.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: store.createStoreCore packages/xstate-store/src/store.ts:235— FunctionTooLong — createStoreCore runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.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: transitionActions.createTransitionEnqueue packages/core/src/transitionActions.ts:734— FunctionTooLong — createTransitionEnqueue runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: cli.verifyCli packages/xstate-codemod/src/verify/cli.ts:110— FunctionTooLong — verifyCli runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: persistedSnapshotValidation.validatePersistedSnapshot packages/core/src/persistedSnapshotValidation.ts:102— FunctionTooLong — validatePersistedSnapshot runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: stateUtils.getDelayedTransitions packages/core/src/stateUtils.ts:366— FunctionTooLong — getDelayedTransitions 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.
FunctionTooLong: persist.persistSnapshotFromLogic packages/xstate-store/src/persist.ts:342— FunctionTooLong — persistSnapshotFromLogic runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
R4 · Test Coverage· No test reaches this file · ×18
No test reaches this file templates/react-ts/src/App.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 templates/react-ts/src/feedbackMachine.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 templates/svelte-ts/src/feedbackMachine.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 templates/vanilla-ts/src/feedbackMachine.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 templates/vue-ts/src/feedbackMachine.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/xstate-codemod/bin/alias-hook.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 templates/vanilla-ts/src/main.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/xstate-codemod/bin/codemod.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file templates/react-ts/src/main.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 templates/svelte-ts/src/main.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 templates/vue-ts/src/Feedback.vue: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 templates/svelte-ts/src/App.svelte: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 templates/vue-ts/src/main.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/xstate-codemod/bin/verify-child.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 templates/vue-ts/src/App.vue: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/core/src/true.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/xstate-react/src/true.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/xstate-vue/src/true.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.
Swallowed exception (empty catch) packages/xstate-store/src/atom.ts:270— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/xstate-store/src/persist.ts:871— `.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/xstate-store/src/persist.ts:875— 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/xstate-store/src/persist.ts:884— `.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/xstate-store/src/persist.ts:888— 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/xstate-store/src/store.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.
Swallowed exception (empty catch) REDACTED:949— 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:2095— 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/core/src/hotSwap.ts:92— 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/core/src/stateUtils.ts:2844— `.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/core/src/system.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/core/src/system.ts:79— 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/core/src/system.ts:87— 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/core/src/validation/index.ts:141— `.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/core/src/durable/index.ts:538— `.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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×10
Recursive walk over a caller-supplied document has no depth cap packages/core/src/State.ts:86— `freezeContext` is exported and takes `value: any` from its caller, and it calls itself at line 86 (`freezeContext`) with a piece of `value` — and nowhere in `freezeContext` 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 `freezeContext` 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/core/src/State.ts:1017— `getPersistedSnapshot` is exported, takes a document from its caller (line 765) and hands it to `persistContext`, which calls itself at line 1017 (`persistContext`) with a piece of `contextPart` — and nowhere in `persistContext` 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 `persistContext` 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/core/src/devDiagnostics.ts:221— `diagnoseAuthorConfig` is exported, takes a document from its caller (line 234) and hands it to `checkStateNode`, which calls itself at line 221 (`checkStateNode`) with a piece of `node` — and nowhere in `checkStateNode` 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 `checkStateNode` 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/core/src/persistedSnapshotFormat.ts:51— `findNonJsonPath` is exported, takes a document from its caller (line 7) and hands it to `visit`, which calls itself at line 51 (`visit`) with a piece of `current` — and nowhere in `visit` 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 `visit` 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/core/src/persistedSnapshotValidation.ts:92— `validatePersistedSnapshot` is exported, takes a document from its caller (line 102) and hands it to `validatePersistedStateValue`, which calls itself at line 92 (`validatePersistedStateValue`) with a piece of `stateValue` — and nowhere in `validatePersistedStateValue` 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 `validatePersistedStateValue` 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/core/src/serialize.ts:212— `machineConfigToJSON` is exported, takes a document from its caller (line 324) and hands it to `valueToJSON`, which calls itself at line 212 (`valueToJSON`) with a piece of `value` (and at line 225) — and nowhere in `valueToJSON` 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 `valueToJSON` 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/core/src/serialize.ts:308— `machineConfigToJSON` is exported, takes a document from its caller (line 324) and hands it to `stateNodeConfigToJSON`, which calls itself at line 308 (`stateNodeConfigToJSON`) with a piece of `config` — and nowhere in `stateNodeConfigToJSON` 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 `stateNodeConfigToJSON` 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/core/src/stateUtils.ts:908— `getStateNodes` is exported and takes `stateValue: StateValue` from its caller, and it calls itself at line 908 (`getStateNodes`) with a piece of `stateValue` — and nowhere in `getStateNodes` 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 `getStateNodes` 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/core/src/stateUtils.ts:971— `transitionNode` is exported and takes `stateValue: StateValue` from its caller, and it calls itself at line 971 (`transitionNode`) with a piece of `stateValue` (and at line 997) — and nowhere in `transitionNode` 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 `transitionNode` 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/core/src/utils.ts:53— `matchesState` is exported and takes `parentStateId: StateValue` from its caller, and it calls itself at line 53 (`matchesState`) with a piece of `parentStateId` — and nowhere in `matchesState` 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 `matchesState` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×7
AC3 · Page structure· Page without a main landmark · ×4
Page without a main landmark templates/react-ts/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 templates/svelte-ts/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="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark templates/vanilla-ts/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="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark templates/vue-ts/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="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
stateUtils.microstep::enterStates (cognitive 141) packages/core/src/stateUtils.ts:1641— stateUtils.microstep::enterStates has cognitive complexity 141 (threshold 15). Drivers by points: if/else 27 (71 pts), ternaries 10 (34 pts), loops 13 (28 pts), boolean chains 8 (nesting depth added 83). To reduce it, split the body into named stages: move each independent 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 (stateUtils.microstep, stateUtils.microstep::exitStates, stateUtils.microstep::enterStates::addDescendantStatesToEnter) 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.
stateUtils.microstep::enterStates::addDescendantStatesToEnter (cognitive 36) packages/core/src/stateUtils.ts:1716— stateUtils.microstep::enterStates::addDescendantStatesToEnter has cognitive complexity 36 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 8 (16 pts) (nesting depth added 20). 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. This shape REPEATS in the file: 3 other methods here (stateUtils.microstep, stateUtils.microstep::exitStates, stateUtils.microstep::enterStates) 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.
stateUtils.microstep::exitStates (cognitive 20) packages/core/src/stateUtils.ts:1516— stateUtils.microstep::exitStates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (stateUtils.microstep, stateUtils.microstep::enterStates, stateUtils.microstep::enterStates::addDescendantStatesToEnter) 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.
MethodTooLong: FunctionBuilder.enqueueActions packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:667— MethodTooLong — enqueueActions runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× 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: StateMachine.initialTransition packages/core/src/StateMachine.ts:1152— MethodTooLong — initialTransition runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: StateMachine.transition packages/core/src/StateMachine.ts:603— MethodTooLong — transition runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.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.
ClassTooLong: Actor packages/core/src/createActor.ts:164— ClassTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 313 over it, 1.78× 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: SetupReturn packages/core/src/setup.ts:4558— ClassTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 191 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FunctionBuilder packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:259— ClassTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 164 over it, 1.41× 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: Actor packages/core/src/createActor.ts:164— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: RuntimeSystem packages/core/src/system.ts:603— 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: SystemReduction packages/core/src/systemTransition.ts:329— 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.
Low cohesion: RuntimeSystem (LCOM4 12) packages/core/src/system.ts:603— RuntimeSystem's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: StateMachine (LCOM4 5) packages/core/src/StateMachine.ts:258— StateMachine's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: FakePage (LCOM4 5) packages/xstate-test/test/fakePage.ts:18— FakePage's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
runtime.createMachineFromSCXMLConfig::executeActions (cyclomatic 117) REDACTED:1614— runtime.createMachineFromSCXMLConfig::executeActions has cyclomatic complexity 117 (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 (runtime.createMachineFromSCXMLConfig::iterNode) 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.
runtime.createMachineFromSCXMLConfig::iterNode (cyclomatic 17) REDACTED:1316— runtime.createMachineFromSCXMLConfig::iterNode 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. This shape REPEATS in the file: one other method here (runtime.createMachineFromSCXMLConfig::executeActions) 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.
stateUtils.microstep::enterStates (cyclomatic 63) packages/core/src/stateUtils.ts:1641— stateUtils.microstep::enterStates has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (stateUtils.microstep, stateUtils.microstep::enterStates::addDescendantStatesToEnter) 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.
stateUtils.microstep::enterStates::addDescendantStatesToEnter (cyclomatic 16) packages/core/src/stateUtils.ts:1716— stateUtils.microstep::enterStates::addDescendantStatesToEnter has cyclomatic complexity 16 (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. This shape REPEATS in the file: 2 other methods here (stateUtils.microstep, stateUtils.microstep::enterStates) 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.
Repeated repair: packages/core/src/graph/graph.ts packages/core/src/graph/graph.ts:95— packages/core/src/graph/graph.ts changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is graph.resolveEventCases at line 95), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix XState v6 feedback runtime, JSON, graph and type regressions (#5776)”; “Package surface cleanup: remove deprecated exports, split @xstate/scxml, fix files/exports and @xstate/svelte ESM (#5739)”; “Fix audited runtime, store, and adapter issues; complete v6 examples (#5697)”; “Fix v6 production integration friction (#5695)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/core/src/graph/graph.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.
Repeated repair: packages/xstate-store-react/src/index.ts packages/xstate-store-react/src/index.ts:218— packages/xstate-store-react/src/index.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is index.useStore at line 218), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “@xstate/store: port flushStorage, clearStorage and inspector fixes to next (#5786)”; “@xstate/store 4.x: declare xstate as an optional peer; backport store fixes from next (#5760)”; “Fix audited runtime, store, and adapter issues; complete v6 examples (#5697)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:09:26 +01:00' --until='2026-11-16 18:09:26 +01:00' --full-history --no-merges -- packages/xstate-store-react/src/index.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.
runtime.createMachineFromSCXMLConfig::executeActions (cognitive 301) REDACTED:1614— runtime.createMachineFromSCXMLConfig::executeActions has cognitive complexity 301 (threshold 15). Drivers by points: if/else 67 (179 pts), error handling 10 (38 pts), ternaries 9 (34 pts), loops 9 (33 pts), boolean chains 14, match/switch 1 (3 pts) (nesting depth added 191). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (runtime.createMachineFromSCXMLConfig::iterNode) 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.
runtime.createMachineFromSCXMLConfig::iterNode (cognitive 18) REDACTED:1316— runtime.createMachineFromSCXMLConfig::iterNode has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 15 (17 pts), boolean chains 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. This shape REPEATS in the file: one other method here (runtime.createMachineFromSCXMLConfig::executeActions) 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.
alien.createReactiveSystem::checkDirty (cognitive 43) packages/xstate-store/src/alien.ts:198— alien.createReactiveSystem::checkDirty has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 25). 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. This shape REPEATS in the file: one other method here (alien.createReactiveSystem::propagate) 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.
alien.createReactiveSystem::propagate (cognitive 26) packages/xstate-store/src/alien.ts:130— alien.createReactiveSystem::propagate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (alien.createReactiveSystem::checkDirty) 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.
Sync-over-async blocking packages/xstate-codemod/src/verify/cli.ts:199— `mkdirSync` in `verifyCli` 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/xstate-codemod/src/verify/cli.ts:200— `writeFileSync` in `verifyCli` 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.
Duplicated block (33 lines × 2 locations) packages/core/src/machineFromJSON.ts:769— packages/core/src/machineFromJSON.ts:769 · REDACTED:814 — 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 (33 lines × 2 locations) packages/core/src/setup.ts:2935— packages/core/src/setup.ts:2935 · packages/core/src/setup.ts:3052 — 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 (24 lines × 2 locations) packages/xstate-effect/src/effectLogic.ts:613— packages/xstate-effect/src/effectLogic.ts:613 · packages/xstate-effect/src/effectLogic.ts:752 — 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 (24 lines × 2 locations) packages/xstate-store/src/store.ts:553— packages/xstate-store/src/store.ts:553 · packages/xstate-store/src/store.ts:581 — 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.
Duplicated block (18 lines × 2 locations) packages/core/src/setup.ts:940— packages/core/src/setup.ts:940 · packages/core/src/types.v6.ts:2145 — 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 (18 lines × 2 locations) packages/core/src/stateUtils.ts:1560— packages/core/src/stateUtils.ts:1560 · packages/core/src/stateUtils.ts:2161 — 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 (16 lines × 2 locations) packages/xstate-solid/src/useMachine.ts:17— packages/xstate-solid/src/useMachine.ts:17 · packages/xstate-svelte/src/useMachine.ts:17 — 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.
Duplicated block (16 lines × 2 locations) packages/xstate-store/src/persist.ts:248— packages/xstate-store/src/persist.ts:248 · packages/xstate-store/src/persist.ts:281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R6 · Tooling· This package's lint script runs in no CI job · ×2
This package's lint script runs in no CI job examples/store-counter-react/package.json:9— The package in `examples/store-counter-react` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `examples/store-counter-react` (or the workspace's task runner).
This package's lint script runs in no CI job examples/store-tic-tac-toe/package.json:9— The package in `examples/store-tic-tac-toe` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `examples/store-tic-tac-toe` (or the workspace's task runner).
Low contrast colour pair in CSS (4.0:1) examples/7guis-flight-booker-react/src/styles/styles.css:64— `& .error` sets color: white on background-color: red — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.3:1) examples/7guis-counter-vue/src/style.css:69— `button` sets color: #f6fcfc on background-color: #acedb4 — 1.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS-in-JS (2.7:1) examples/trivia-game-example/src/components/styled/Button.tsx:15— A styled-components/emotion style declares a foreground/background colour pair below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×1
Animation without a prefers-reduced-motion guard examples/notifications-react/src/App.css:126— `.toast .bar.running` moves (`animation: shrink 4s linear 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.
index.createDurable (cyclomatic 123) packages/core/src/durable/index.ts:401— index.createDurable has cyclomatic complexity 123 (threshold 15). Of this number, 66 points are the body's own statements and 57 belong to 14 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.
scxml.toStateNodeJSON (cyclomatic 95) REDACTED:530— scxml.toStateNodeJSON has cyclomatic complexity 95 (threshold 15). Of this number, 53 points are the body's own statements and 42 belong to 12 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.
FunctionBuilder.enqueueActions (cyclomatic 84) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:667— FunctionBuilder.enqueueActions has cyclomatic complexity 84 (threshold 15). Of this number, 70 points are the body's own statements and 14 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.
index.restoreMachineSnapshot (cyclomatic 68) packages/core/src/persist/index.ts:171— index.restoreMachineSnapshot has cyclomatic complexity 68 (threshold 15). Of this number, 48 points are the body's own statements and 20 belong to 3 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.
persistedSnapshotValidation.validatePersistedSnapshot (cyclomatic 66) packages/core/src/persistedSnapshotValidation.ts:102— persistedSnapshotValidation.validatePersistedSnapshot has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
stateUtils.macrostep (cyclomatic 50) packages/core/src/stateUtils.ts:2476— stateUtils.macrostep has cyclomatic complexity 50 (threshold 15). Of this number, 29 points are the body's own statements and 21 belong to 3 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.
createEffectActor.createEffectActor (cyclomatic 46) packages/xstate-effect/src/createEffectActor.ts:94— createEffectActor.createEffectActor has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 371, 292, 103, …). 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.
scxml.mapAction (cyclomatic 37) REDACTED:216— scxml.mapAction has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State.getPersistedSnapshot (cyclomatic 36) packages/core/src/State.ts:765— State.getPersistedSnapshot has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
transitionActions.resolveActionsWithContext (cyclomatic 35) packages/core/src/transitionActions.ts:1254— transitionActions.resolveActionsWithContext has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StateMachine._transitionFast (cyclomatic 33) packages/core/src/StateMachine.ts:769— StateMachine._transitionFast has cyclomatic complexity 33 (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.
undo.undoRedoFromLogic (cyclomatic 33) packages/xstate-store/src/undo.ts:83— undo.undoRedoFromLogic has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 168, a function literal at line 316, restore). 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.
FunctionBuilder.creator (cyclomatic 32) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:557— FunctionBuilder.creator has cyclomatic complexity 32 (threshold 15). Of this number, 30 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.
lower-actions.planMachines::visitState (cyclomatic 32) packages/xstate-codemod/src/transforms/lower-actions.ts:393— lower-actions.planMachines::visitState 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. This shape REPEATS in the file: one other method here (lower-actions.planMachines) 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.
stateUtils.microstep (cyclomatic 28) packages/core/src/stateUtils.ts:1379— stateUtils.microstep has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (stateUtils.microstep::enterStates, stateUtils.microstep::enterStates::addDescendantStatesToEnter) 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.
Actor._start (cyclomatic 27) packages/core/src/createActor.ts:863— Actor._start has cyclomatic complexity 27 (threshold 15). 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, 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.
FunctionBuilder.guard (cyclomatic 27) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:346— FunctionBuilder.guard has cyclomatic complexity 27 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
persistence.checkMetadata (cyclomatic 27) packages/xstate-effect/src/persistence.ts:202— persistence.checkMetadata has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
logic.createStepLogic (cyclomatic 26) packages/core/src/actors/logic.ts:315— logic.createStepLogic has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 324, 391, 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.
hotSwap.hotSwapActorLogic (cyclomatic 26) packages/core/src/hotSwap.ts:31— hotSwap.hotSwapActorLogic 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.
cli.verifyCli (cyclomatic 26) packages/xstate-codemod/src/verify/cli.ts:110— cli.verifyCli has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs 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.
persistence.checkSnapshot (cyclomatic 26) packages/xstate-effect/src/persistence.ts:110— persistence.checkSnapshot 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.
runtime.evaluateExpr (cyclomatic 26) REDACTED:897— runtime.evaluateExpr has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 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.
atom.createAtom (cyclomatic 26) packages/xstate-store/src/atom.ts:310— atom.createAtom has cyclomatic complexity 26 (threshold 15). Of this number, 18 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.
machineFromJSON.assertMachineJSON::assertStateNode (cyclomatic 25) packages/core/src/machineFromJSON.ts:678— machineFromJSON.assertMachineJSON::assertStateNode 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.
cli.main (cyclomatic 25) packages/xstate-codemod/src/cli.ts:112— cli.main has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
analysis.resolveStringConstant (cyclomatic 24) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:319— analysis.resolveStringConstant has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
persistence.checkJson (cyclomatic 24) packages/xstate-effect/src/persistence.ts:43— persistence.checkJson 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.
runtime.assertMachineJSON::assertStateNode (cyclomatic 24) REDACTED:733— runtime.assertMachineJSON::assertStateNode 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.
atom.settleSources (cyclomatic 24) packages/xstate-store/src/atom.ts:58— atom.settleSources 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.
StateNode.constructor (cyclomatic 23) packages/core/src/StateNode.ts:164— StateNode.constructor has cyclomatic complexity 23 (threshold 15). Of this number, 22 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.
devDiagnostics.checkStateNode (cyclomatic 23) packages/core/src/devDiagnostics.ts:174— devDiagnostics.checkStateNode 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.
lower-actions.planMachines (cyclomatic 23) packages/xstate-codemod/src/transforms/lower-actions.ts:248— lower-actions.planMachines 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 (lower-actions.planMachines::visitState) 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.
agent.run (cyclomatic 22) packages/core/bin/agent.js:178— agent.run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StateNode.formatTransitions (cyclomatic 22) packages/core/src/StateNode.ts:493— StateNode.formatTransitions has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 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.
SystemReduction.relayAttachments (cyclomatic 22) packages/core/src/systemTransition.ts:466— SystemReduction.relayAttachments has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lower-actions.moveImplementations (cyclomatic 22) packages/xstate-codemod/src/transforms/lower-actions.ts:123— lower-actions.moveImplementations has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
snapshotActorRef.createSnapshotSystem (cyclomatic 21) packages/core/src/snapshotActorRef.ts:121— snapshotActorRef.createSnapshotSystem has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
serialize.getMachineSerializationDiagnostics::visit (cyclomatic 21) packages/core/src/serialize.ts:43— serialize.getMachineSerializationDiagnostics::visit 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.
systemTransition.encode (cyclomatic 21) packages/core/src/systemTransition.ts:202— systemTransition.encode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
analysis.implConstAssign (cyclomatic 21) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:563— analysis.implConstAssign has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 585, 584). 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.
persist.persistEventFromLogic (cyclomatic 21) packages/xstate-store/src/persist.ts:509— persist.persistEventFromLogic has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 604, a function literal at line 540, a function literal at line 713, …). 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.
SystemReduction.effectsFor (cyclomatic 20) packages/core/src/systemTransition.ts:822— SystemReduction.effectsFor 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.
Actor.constructor (cyclomatic 19) packages/core/src/createActor.ts:300— Actor.constructor has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
inertActorScope.createInertActorScope (cyclomatic 19) packages/core/src/inertActorScope.ts:234— inertActorScope.createInertActorScope has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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.
stateUtils.getDelayedTransitions (cyclomatic 19) packages/core/src/stateUtils.ts:366— stateUtils.getDelayedTransitions has cyclomatic complexity 19 (threshold 15). 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, 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.
SystemReduction.send (cyclomatic 19) packages/core/src/systemTransition.ts:1124— SystemReduction.send has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
analysis.classify (cyclomatic 19) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:96— analysis.classify 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.
createImmutable.updateStore::diff (cyclomatic 19) packages/xstate-solid/src/createImmutable.ts:31— createImmutable.updateStore::diff 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.
persistedSnapshotFormat.findNonJsonPath::visit (cyclomatic 18) packages/core/src/persistedSnapshotFormat.ts:12— persistedSnapshotFormat.findNonJsonPath::visit 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.
effectDescriptor.describeExecutableEffect (cyclomatic 18) packages/core/src/effectDescriptor.ts:132— effectDescriptor.describeExecutableEffect has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
machineFromJSON.machineFromJSON::executeActions (cyclomatic 18) packages/core/src/machineFromJSON.ts:949— machineFromJSON.machineFromJSON::executeActions 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.
string-targets.walkStateNode (cyclomatic 18) packages/xstate-codemod/src/transforms/string-targets.ts:74— string-targets.walkStateNode 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.
types-to-schemas.eventsToEventMap (cyclomatic 18) packages/xstate-codemod/src/transforms/types-to-schemas.ts:20— types-to-schemas.eventsToEventMap 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.
FunctionBuilder.action (cyclomatic 18) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:503— FunctionBuilder.action 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.
codegen.lowerAssignDefinition (cyclomatic 18) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:1301— codegen.lowerAssignDefinition has cyclomatic complexity 18 (threshold 15). Of this number, 12 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.
normalize.toJson (cyclomatic 18) packages/xstate-codemod/src/verify/normalize.ts:31— normalize.toJson 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.
StateNode.validateStateNodeConfig (cyclomatic 17) packages/core/src/StateNode.ts:369— StateNode.validateStateNodeConfig 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.
StateNode.formatInitialTransition (cyclomatic 17) packages/core/src/StateNode.ts:728— StateNode.formatInitialTransition has cyclomatic complexity 17 (threshold 15). 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: 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.
transitionActions.createTransitionEnqueue (cyclomatic 17) packages/core/src/transitionActions.ts:734— transitionActions.createTransitionEnqueue 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 8 function literals inside it that branch (lines 773, 905, 865, …). 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.
persistedSnapshotValidation.validatePersistedStateValue (cyclomatic 17) packages/core/src/persistedSnapshotValidation.ts:44— persistedSnapshotValidation.validatePersistedStateValue has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
Actor._error (cyclomatic 17) packages/core/src/createActor.ts:1200— Actor._error 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.
stateUtils.getTransitionDomain (cyclomatic 17) packages/core/src/stateUtils.ts:1214— stateUtils.getTransitionDomain 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.
pathFromEvents.getPathsFromEvents (cyclomatic 17) packages/core/src/graph/pathFromEvents.ts:15— pathFromEvents.getPathsFromEvents 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.
analysis.derefConfig (cyclomatic 17) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:489— analysis.derefConfig 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.
alien.createReactiveSystem::checkDirty (cyclomatic 17) packages/xstate-store/src/alien.ts:198— alien.createReactiveSystem::checkDirty has cyclomatic complexity 17 (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.
SystemReduction.process (cyclomatic 16) packages/core/src/systemTransition.ts:1021— SystemReduction.process 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.
lower-actions.cleanupImports (cyclomatic 16) packages/xstate-codemod/src/transforms/lower-actions.ts:697— lower-actions.cleanupImports 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.
generate.generateSequences (cyclomatic 16) packages/xstate-codemod/src/verify/generate.ts:66— generate.generateSequences 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 items inside it that branch (randomWalk, fromPaths, a function literal at line 121). 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×1
Fixed-sleep synchronisation: root-bound events sent while the loop is parked reach the host runtime packages/core/test/durable-address-first.test.ts:519— This test starts work it did not wait for (`durable`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — 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.
Deprecated: @babel/plugin-proposal-class-properties package.json:83— @babel/plugin-proposal-class-properties 7.18.6, declared in package.json, is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.". Replace it with the package or version that message names, or record why this one must stay.
scxml.toStateNodeJSON (cognitive 118) REDACTED:530— scxml.toStateNodeJSON has cognitive complexity 118 (threshold 15). Drivers by points: ternaries 30 (42 pts), if/else 29 (41 pts), boolean chains 21, loops 6 (14 pts) (nesting depth added 32). Of this number, 76 points are the body's own statements and 42 belong to 12 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.
FunctionBuilder.enqueueActions (cognitive 98) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:667— FunctionBuilder.enqueueActions has cognitive complexity 98 (threshold 15). Drivers by points: if/else 32 (48 pts), boolean chains 24, loops 9 (13 pts), ternaries 7 (13 pts) (nesting depth added 26). Of this number, 89 points are the body's own statements and 9 belong to 8 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.
persistedSnapshotValidation.validatePersistedSnapshot (cognitive 95) packages/core/src/persistedSnapshotValidation.ts:102— persistedSnapshotValidation.validatePersistedSnapshot has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 17 (51 pts), if/else 12 (22 pts), boolean chains 18, error handling 1 (2 pts), loops 2 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.restoreMachineSnapshot (cognitive 76) packages/core/src/persist/index.ts:171— index.restoreMachineSnapshot has cognitive complexity 76 (threshold 15). Drivers by points: if/else 28 (50 pts), ternaries 14 (35 pts), boolean chains 12, loops 6 (8 pts), error handling 1 (4 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.restoreMachineSnapshot::reviveHistoryValue) 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.
index.createDurable (cognitive 74) packages/core/src/durable/index.ts:401— index.createDurable has cognitive complexity 74 (threshold 15). Drivers by points: if/else 42 (71 pts), boolean chains 31, loops 12 (18 pts), ternaries 12 (14 pts), error handling 1 (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. This shape REPEATS in the file: one other method here (index.createDurable::installSystemRuntime) 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.
undo.undoRedoFromLogic (cognitive 71) packages/xstate-store/src/undo.ts:83— undo.undoRedoFromLogic has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (46 pts), loops 6 (18 pts), boolean chains 5, ternaries 2 (nesting depth added 35). Most of this is not in the body itself: 2 of the 71 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 316, a function literal at line 168, restore). 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.
stateUtils.macrostep (cognitive 70) packages/core/src/stateUtils.ts:2476— stateUtils.macrostep has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (44 pts), boolean chains 16, ternaries 4 (9 pts), loops 1 (nesting depth added 20). Of this number, 44 points are the body's own statements and 26 belong to 3 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.
transitionActions.resolveActionsWithContext (cognitive 67) packages/core/src/transitionActions.ts:1254— transitionActions.resolveActionsWithContext has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 14 (45 pts), if/else 5 (11 pts), boolean chains 10, loops 1 (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.
createEffectActor.createEffectActor (cognitive 59) packages/xstate-effect/src/createEffectActor.ts:94— createEffectActor.createEffectActor has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (32 pts), ternaries 7 (12 pts), boolean chains 7, loops 5, error handling 2 (3 pts) (nesting depth added 14). None of this is in the body itself: all 59 points belong to 15 function literals inside it that branch (lines 371, 292, 252, …). 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.
atom.settleSources (cognitive 55) packages/xstate-store/src/atom.ts:58— atom.settleSources has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 6 (14 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State.getPersistedSnapshot (cognitive 51) packages/core/src/State.ts:765— State.getPersistedSnapshot has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 13 (19 pts), boolean chains 10, loops 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.
lower-actions.planMachines (cognitive 49) packages/xstate-codemod/src/transforms/lower-actions.ts:248— lower-actions.planMachines has cognitive complexity 49 (threshold 15). Drivers by points: if/else 37 (92 pts), loops 15 (28 pts), ternaries 7 (25 pts), boolean chains 18, match/switch 1 (3 pts), error handling 1 (nesting depth added 88). To reduce it, split the body into named stages: move each independent 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 (lower-actions.planMachines::visitState) 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.
lower-actions.planMachines::visitState (cognitive 47) packages/xstate-codemod/src/transforms/lower-actions.ts:393— lower-actions.planMachines::visitState has cognitive complexity 47 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 3 (11 pts), loops 3 (8 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lower-actions.planMachines) 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.
scxml.mapAction (cognitive 46) REDACTED:216— scxml.mapAction has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 9 (24 pts), if/else 7 (15 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (nesting depth added 25). 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.
FunctionBuilder.guard (cognitive 45) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:346— FunctionBuilder.guard has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 5 (14 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 22). Of this number, 42 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.
persistence.checkMetadata (cognitive 43) packages/xstate-effect/src/persistence.ts:202— persistence.checkMetadata has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 10, loops 3 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateNode.formatTransitions (cognitive 40) packages/core/src/StateNode.ts:493— StateNode.formatTransitions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 19). Of this number, 28 points are the body's own statements and 12 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.
cli.main (cognitive 38) packages/xstate-codemod/src/cli.ts:112— cli.main has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 9 (12 pts), loops 4 (8 pts), boolean chains 3, error handling 2 (nesting depth added 13). Of this number, 37 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.
devDiagnostics.checkStateNode (cognitive 37) packages/core/src/devDiagnostics.ts:174— devDiagnostics.checkStateNode has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 7 (13 pts), ternaries 3 (8 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
string-targets.walkStateNode (cognitive 37) packages/xstate-codemod/src/transforms/string-targets.ts:74— string-targets.walkStateNode has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (7 pts), ternaries 2 (7 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.
lower-actions.moveImplementations (cognitive 36) packages/xstate-codemod/src/transforms/lower-actions.ts:123— lower-actions.moveImplementations has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 3 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
persistence.checkSnapshot (cognitive 36) packages/xstate-effect/src/persistence.ts:110— persistence.checkSnapshot has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stateUtils.microstep (cognitive 34) packages/core/src/stateUtils.ts:1379— stateUtils.microstep has cognitive complexity 34 (threshold 15). Drivers by points: if/else 67 (142 pts), loops 28 (58 pts), ternaries 16 (46 pts), boolean chains 25 (nesting depth added 135). To reduce it, split the body into named stages: move each independent 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 (stateUtils.microstep::exitStates, stateUtils.microstep::enterStates, stateUtils.microstep::enterStates::addDescendantStatesToEnter) 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.
cli.verifyCli (cognitive 34) packages/xstate-codemod/src/verify/cli.ts:110— cli.verifyCli has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 6 (12 pts), error handling 4 (6 pts), boolean chains 2 (nesting depth added 13). Of this number, 33 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.
Actor._start (cognitive 33) packages/core/src/createActor.ts:863— Actor._start has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 10). Of this number, 31 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.
SystemReduction.relayAttachments (cognitive 32) packages/core/src/systemTransition.ts:466— SystemReduction.relayAttachments has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (12 pts), boolean chains 4, loops 1 (nesting depth added 17). 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.
diff.diffTraces (cognitive 32) packages/xstate-codemod/src/verify/diff.ts:55— diff.diffTraces has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionBuilder.creator (cognitive 31) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:557— FunctionBuilder.creator has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, ternaries 3 (7 pts), match/switch 1 (nesting depth added 12). Of this number, 29 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.
agent.run (cognitive 30) packages/core/bin/agent.js:178— agent.run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
machineFromJSON.assertMachineJSON::assertStateNode (cognitive 30) packages/core/src/machineFromJSON.ts:678— machineFromJSON.assertMachineJSON::assertStateNode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, loops 3 (6 pts), ternaries 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. This shape REPEATS in the file: one other method here (machineFromJSON.assertMachineJSON) 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.
createImmutable.updateStore::diff (cognitive 30) packages/xstate-solid/src/createImmutable.ts:31— createImmutable.updateStore::diff has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (9 pts), boolean chains 3 (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.
Actor._error (cognitive 29) packages/core/src/createActor.ts:1200— Actor._error has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
persistence.checkJson (cognitive 29) packages/xstate-effect/src/persistence.ts:43— persistence.checkJson has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, loops 2 (4 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.
runtime.assertMachineJSON::assertStateNode (cognitive 29) REDACTED:733— runtime.assertMachineJSON::assertStateNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, loops 3 (6 pts), ternaries 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. This shape REPEATS in the file: one other method here (runtime.assertMachineJSON) 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.
stateUtils.getAllStateNodes (cognitive 28) packages/core/src/stateUtils.ts:169— stateUtils.getAllStateNodes has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 4 (10 pts), boolean chains 2 (nesting depth added 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.
hotSwap.hotSwapActorLogic (cognitive 28) packages/core/src/hotSwap.ts:31— hotSwap.hotSwapActorLogic has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, loops 4, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pathFromEvents.getPathsFromEvents (cognitive 28) packages/core/src/graph/pathFromEvents.ts:15— pathFromEvents.getPathsFromEvents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (4 pts), error handling 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.
FunctionBuilder.action (cognitive 28) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:503— FunctionBuilder.action has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (5 pts), boolean chains 4 (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.
logic.createStepLogic (cognitive 27) packages/core/src/actors/logic.ts:315— logic.createStepLogic has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 2). None of this is in the body itself: all 27 points belong to 7 function literals inside it that branch (lines 324, 487, 391, …). 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.
snapshotActorRef.createSnapshotSystem (cognitive 27) packages/core/src/snapshotActorRef.ts:121— snapshotActorRef.createSnapshotSystem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 3 (4 pts), ternaries 3 (4 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 9 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.
SystemReduction.effectsFor (cognitive 27) packages/core/src/systemTransition.ts:822— SystemReduction.effectsFor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 4, match/switch 1 (2 pts), 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.
analysis.resolveStringConstant (cognitive 27) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:319— analysis.resolveStringConstant has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, ternaries 3 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
persistedSnapshotValidation.validatePersistedStateValue (cognitive 26) packages/core/src/persistedSnapshotValidation.ts:44— persistedSnapshotValidation.validatePersistedStateValue has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 5 (7 pts), boolean chains 2, loops 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 10 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.
codegen.lowerTransition (cognitive 26) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:1215— codegen.lowerTransition has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (5 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.
generate.generateSequences (cognitive 26) packages/xstate-codemod/src/verify/generate.ts:66— generate.generateSequences has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4, error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (randomWalk, fromPaths, a function literal at line 121). 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.
persist.persistEventFromLogic (cognitive 26) packages/xstate-store/src/persist.ts:509— persist.persistEventFromLogic has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 4 (6 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). None of this is in the body itself: all 26 points belong to 4 function items inside it that branch (a function literal at line 604, a function literal at line 713, a function literal at line 540, …). 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.
State.persistContext (cognitive 25) packages/core/src/State.ts:987— State.persistContext has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 2 (9 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
alien.signalOper (cognitive 25) packages/xstate-store/src/alien.ts:601— alien.signalOper has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (2 pts) (nesting depth added 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.
utils.resolveInvokedActorLogic (cognitive 24) packages/core/src/utils.ts:367— utils.resolveInvokedActorLogic has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 5 (8 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stateUtils.getDelayedTransitions (cognitive 24) packages/core/src/stateUtils.ts:366— stateUtils.getDelayedTransitions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 5 (8 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 8). Of this number, 22 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.
machineSchemas.eventSchema (cognitive 24) packages/core/src/machineSchemas.ts:218— machineSchemas.eventSchema has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 12). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 228). 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.
analysis.derefConfig (cognitive 24) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:489— analysis.derefConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitionActions.createTransitionEnqueue (cognitive 23) packages/core/src/transitionActions.ts:734— transitionActions.createTransitionEnqueue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 773, 905, 759, …). 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.
stateUtils.getTransitionDomain (cognitive 23) packages/core/src/stateUtils.ts:1214— stateUtils.getTransitionDomain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
machineVersions.machineVersions.adaptEvents (cognitive 23) packages/core/src/machineVersions.ts:420— machineVersions.machineVersions.adaptEvents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.standardSchemaValidator.checkMachineResult (cognitive 23) packages/core/src/validation/index.ts:223— index.standardSchemaValidator.checkMachineResult has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (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.
analysis.classify (cognitive 23) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:96— analysis.classify has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analysis.nonModuleReferences (cognitive 23) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:376— analysis.nonModuleReferences has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), boolean chains 3, ternaries 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.
devDiagnostics.checkTransitions (cognitive 22) packages/core/src/devDiagnostics.ts:97— devDiagnostics.checkTransitions has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serialize.getMachineSerializationDiagnostics::visit (cognitive 22) packages/core/src/serialize.ts:43— serialize.getMachineSerializationDiagnostics::visit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, ternaries 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
adjacency.getAdjacencyMap (cognitive 22) packages/core/src/graph/adjacency.ts:46— adjacency.getAdjacencyMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
types-to-schemas.eventsToEventMap (cognitive 22) packages/xstate-codemod/src/transforms/types-to-schemas.ts:20— types-to-schemas.eventsToEventMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateNode.validateStateNodeConfig (cognitive 21) packages/core/src/StateNode.ts:369— StateNode.validateStateNodeConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stateUtils.getTransitionResult (cognitive 21) packages/core/src/stateUtils.ts:2281— stateUtils.getTransitionResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (7 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.restoreMachineSnapshot::reviveHistoryValue (cognitive 21) packages/core/src/persist/index.ts:361— index.restoreMachineSnapshot::reviveHistoryValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.restoreMachineSnapshot) 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.
machineFromJSON.machineFromJSON::executeActions (cognitive 21) packages/core/src/machineFromJSON.ts:949— machineFromJSON.machineFromJSON::executeActions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (3 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Branch.finish (cognitive 21) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:198— Branch.finish has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 12). Of this number, 12 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
StateMachine.transition (cognitive 20) packages/core/src/StateMachine.ts:603— StateMachine.transition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (7 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.
StateMachine._transitionFast (cognitive 20) packages/core/src/StateMachine.ts:769— StateMachine._transitionFast has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6, ternaries 4 (5 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.
serialize.machineConfigToJSON (cognitive 20) packages/core/src/serialize.ts:324— serialize.machineConfigToJSON has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
systemTransition.encode (cognitive 20) packages/core/src/systemTransition.ts:202— systemTransition.encode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (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.
util.ensureNamedImport (cognitive 20) packages/xstate-codemod/src/util.ts:56— util.ensureNamedImport has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run.runVerify (cognitive 20) packages/xstate-codemod/src/verify/run.ts:198— run.runVerify has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 1 (2 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.
runtime.evaluateExpr (cognitive 20) REDACTED:897— runtime.evaluateExpr has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 3, error handling 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 8 belong to 3 function items 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.
machineFromJSON.assertMachineJSON (cognitive 19) packages/core/src/machineFromJSON.ts:535— machineFromJSON.assertMachineJSON has cognitive complexity 19 (threshold 15). Drivers by points: if/else 33 (42 pts), ternaries 12 (24 pts), loops 8 (15 pts), boolean chains 9 (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. This shape REPEATS in the file: one other method here (machineFromJSON.assertMachineJSON::assertStateNode) 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.
analysis.implConstAssign (cognitive 19) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:563— analysis.implConstAssign has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 5, loops 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 2 function literals inside it that branch (lines 585, 584). 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.
lower-actions.cleanupImports (cognitive 19) packages/xstate-codemod/src/transforms/lower-actions.ts:697— lower-actions.cleanupImports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 3 (4 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.
atom.createAtom (cognitive 19) packages/xstate-store/src/atom.ts:310— atom.createAtom has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (6 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
StateNode.formatInitialTransition (cognitive 18) packages/core/src/StateNode.ts:728— StateNode.formatInitialTransition has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 5, if/else 1 (nesting depth added 2). 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: 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.
devDiagnostics.checkLifecycleEventKey (cognitive 18) packages/core/src/devDiagnostics.ts:69— devDiagnostics.checkLifecycleEventKey has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (13 pts), boolean chains 3, if/else 2 (nesting depth added 8). 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.
index.createDurable::installSystemRuntime (cognitive 18) packages/core/src/durable/index.ts:732— index.createDurable::installSystemRuntime has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (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. This shape REPEATS in the file: one other method here (index.createDurable) 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.
SystemReduction.send (cognitive 18) packages/core/src/systemTransition.ts:1124— SystemReduction.send has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). 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.
FunctionBuilder.assign (cognitive 18) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:952— FunctionBuilder.assign has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 5 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.
codegen.lowerAssignDefinition (cognitive 18) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:1301— codegen.lowerAssignDefinition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 12 points are the body's own statements and 6 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.
oxlint.returnedExpressions::visit (cognitive 18) packages/xstate-effect/src/oxlint.ts:43— oxlint.returnedExpressions::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (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.
StateNode.constructor (cognitive 17) packages/core/src/StateNode.ts:164— StateNode.constructor has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 6, if/else 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Actor.constructor (cognitive 17) packages/core/src/createActor.ts:300— Actor.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, 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.
stateUtils.removeConflictingTransitions (cognitive 17) packages/core/src/stateUtils.ts:1061— stateUtils.removeConflictingTransitions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts) (nesting depth added 9). Of this number, 16 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.
stateUtils.getEffectiveTargetStates (cognitive 17) packages/core/src/stateUtils.ts:1154— stateUtils.getEffectiveTargetStates has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (8 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
serialize.valueToJSON (cognitive 17) packages/core/src/serialize.ts:196— serialize.valueToJSON has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
types-to-schemas.getTypesMembers (cognitive 17) packages/xstate-codemod/src/transforms/types-to-schemas.ts:76— types-to-schemas.getTypesMembers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 15 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.
store.createStoreTransition.storeTransition (cognitive 17) packages/xstate-store/src/store.ts:788— store.createStoreTransition.storeTransition has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
persist.persistSnapshotFromLogic (cognitive 17) packages/xstate-store/src/persist.ts:342— persist.persistSnapshotFromLogic has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 420, 486, 363). 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.
transitionActions.updateLogicalTimers (cognitive 16) packages/core/src/transitionActions.ts:289— transitionActions.updateLogicalTimers has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3 (4 pts) (nesting depth added 2). 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, 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.
machineVersions.machineVersions.parseSnapshot (cognitive 16) packages/core/src/machineVersions.ts:356— machineVersions.machineVersions.parseSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (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.
graph.resolveEventCases (cognitive 16) packages/core/src/graph/graph.ts:95— graph.resolveEventCases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shortestPaths.getShortestPaths (cognitive 16) packages/core/src/graph/shortestPaths.ts:37— shortestPaths.getShortestPaths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 8). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simplePaths.getSimplePaths (cognitive 16) packages/core/src/graph/simplePaths.ts:38— simplePaths.getSimplePaths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (util). 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.
FunctionBuilder.dynamic (cognitive 16) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:306— FunctionBuilder.dynamic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
runtime.assertMachineJSON (cognitive 16) REDACTED:630— runtime.assertMachineJSON has cognitive complexity 16 (threshold 15). Drivers by points: if/else 26 (32 pts), ternaries 10 (21 pts), loops 6 (12 pts), boolean chains 11 (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. This shape REPEATS in the file: one other method here (runtime.assertMachineJSON::assertStateNode) 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.
store.createStoreCore (cognitive 16) packages/xstate-store/src/store.ts:235— store.createStoreCore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4, boolean chains 3, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (receive, canTransition, a function literal at line 290, …). 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.
No structured logging — No logging call was found in the 219 JavaScript/TypeScript production file(s) this check read across 20 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
Duplication concentrated across 14 sibling directories (31 clone groups) packages/core/src/machineFromJSON.ts:199— 31 duplicated blocks under packages/ have copies in at least two of the sibling directories core, xstate-effect, xstate-react, xstate-scxml, xstate-solid, xstate-store (+8 more sibling(s) not listed) — 17 of them are reported below, and 14 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 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 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 31 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 (360 matched lines × 2 locations) · ×1
Duplicated block with local edits (360 matched lines × 2 locations) packages/core/src/machineFromJSON.ts:199— packages/core/src/machineFromJSON.ts:199 · REDACTED:379 — the two spans are one implementation copied and then locally edited — 2289 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 (92 matched lines × 2 locations) · ×1
Duplicated block with local edits (92 matched lines × 2 locations) packages/xstate-effect/src/effectLogic.ts:326— packages/xstate-effect/src/effectLogic.ts:326 · packages/xstate-effect/src/effectLogic.ts:541 — the two spans are one implementation copied and then locally edited — 461 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 (89 matched lines × 2 locations) · ×1
Duplicated block with local edits (89 matched lines × 2 locations) packages/xstate-effect/src/effectLogic.ts:505— packages/xstate-effect/src/effectLogic.ts:505 · packages/xstate-effect/src/effectLogic.ts:643 — the two spans are one implementation copied and then locally edited — 468 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 (88 matched lines × 2 locations) · ×1
Duplicated block with local edits (88 matched lines × 2 locations) packages/xstate-store-solid/src/index.ts:28— packages/xstate-store-solid/src/index.ts:28 · packages/xstate-store-vue/src/index.ts:22 — the two spans are one implementation copied and then locally edited — 544 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 (81 matched lines × 2 locations) · ×1
Duplicated block with local edits (81 matched lines × 2 locations) packages/xstate-store-preact/src/index.ts:139— packages/xstate-store-preact/src/index.ts:139 · packages/xstate-store-react/src/index.ts:45 — the two spans are one implementation copied and then locally edited — 524 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 (80 matched lines × 2 locations) · ×1
Duplicated block with local edits (80 matched lines × 2 locations) packages/core/src/createMachine.ts:152— packages/core/src/createMachine.ts:152 · packages/core/src/createMachine.ts:273 — the two spans are one implementation copied and then locally edited — 338 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 (71 lines × 2 locations) packages/core/src/types.ts:932— packages/core/src/types.ts:932 · packages/core/src/types.ts:1041 — 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 (58 lines × 3 locations) packages/core/src/types.ts:867— packages/core/src/types.ts:867 · packages/core/src/types.ts:957 · packages/core/src/types.ts:1077 — all 3 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.
Duplicated block (54 lines × 4 locations) templates/react-ts/src/feedbackMachine.ts:3— templates/react-ts/src/feedbackMachine.ts:3 · templates/svelte-ts/src/feedbackMachine.ts:3 · templates/vanilla-ts/src/feedbackMachine.ts:3 · templates/vue-ts/src/feedbackMachine.ts:3 — the 4 copies are spread across 4 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.
Duplicated block (53 lines × 2 locations) packages/core/src/machineFromJSON.ts:829— packages/core/src/machineFromJSON.ts:829 · REDACTED:1147 — 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 (46 lines × 2 locations) packages/core/src/setup.ts:4888— packages/core/src/setup.ts:4888 · packages/core/src/setup.ts:4935 — 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 (42 lines × 2 locations) packages/core/src/machineFromJSON.ts:894— packages/core/src/machineFromJSON.ts:894 · REDACTED:1205 — 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 (41 lines × 2 locations) packages/xstate-store/src/fromStore.ts:173— packages/xstate-store/src/fromStore.ts:173 · packages/xstate-store/src/fromStore.ts:215 — 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 (37 matched lines × 2 locations) · ×1
Duplicated block with local edits (37 matched lines × 2 locations) packages/xstate-codemod/src/verify/recorder5.ts:5— packages/xstate-codemod/src/verify/recorder5.ts:5 · packages/xstate-codemod/src/verify/recorder6.ts:5 — the two spans are one implementation copied and then locally edited — 208 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 (36 lines × 2 locations) packages/core/src/machineFromJSON.ts:121— packages/core/src/machineFromJSON.ts:121 · REDACTED:299 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (35 lines × 2 locations) packages/core/src/setup.ts:2737— packages/core/src/setup.ts:2737 · packages/core/src/setup.ts:2897 — 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.
R10 · Code Duplication· Duplicated block with local edits (32 matched lines × 2 locations) · ×1
Duplicated block with local edits (32 matched lines × 2 locations) packages/core/src/State.ts:523— packages/core/src/State.ts:523 · packages/core/src/StateMachine.ts:1124 — the two spans are one implementation copied and then locally edited — 60 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 (31 matched lines × 2 locations) · ×1
Duplicated block with local edits (31 matched lines × 2 locations) packages/xstate-codemod/src/transforms/report-action-shapes.ts:19— packages/xstate-codemod/src/transforms/report-action-shapes.ts:19 · packages/xstate-codemod/src/transforms/suffixed-lifecycle-events.ts:53 — the two spans are one implementation copied and then locally edited — 241 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 (28 matched lines × 2 locations) · ×1
Duplicated block with local edits (28 matched lines × 2 locations) packages/core/src/createActor.ts:752— packages/core/src/createActor.ts:752 · packages/xstate-effect/src/effectActor.ts:234 — the two spans are one implementation copied and then locally edited — 148 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 (28 lines × 2 locations) packages/xstate-react/src/shallowEqual.ts:11— packages/xstate-react/src/shallowEqual.ts:11 · packages/xstate-store/src/shallowEqual.ts:10 — 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 (26 lines × 2 locations) packages/core/src/graph/shortestPaths.ts:23— packages/core/src/graph/shortestPaths.ts:23 · packages/core/src/graph/simplePaths.ts:24 — 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.
R10 · Code Duplication· Duplicated block with local edits (24 matched lines × 2 locations) · ×1
Duplicated block with local edits (24 matched lines × 2 locations) packages/core/src/devDiagnostics.ts:99— packages/core/src/devDiagnostics.ts:99 · packages/core/src/devDiagnostics.ts:149 — the two spans are one implementation copied and then locally edited — 76 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 (23 matched lines × 2 locations) · ×1
Duplicated block with local edits (23 matched lines × 2 locations) packages/core/src/StateMachine.ts:639— packages/core/src/StateMachine.ts:639 · packages/core/src/actors/logic.ts:489 — the two spans are one implementation copied and then locally edited — 81 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 (23 lines × 2 locations) packages/core/src/schema.types.ts:112— packages/core/src/schema.types.ts:112 · packages/xstate-store/src/schema.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (20 lines × 2 locations) packages/core/src/setup.ts:4045— packages/core/src/setup.ts:4045 · packages/core/src/setup.ts:4282 — 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.
Duplicated block (20 lines × 3 locations) packages/xstate-store-preact/src/index.ts:94— packages/xstate-store-preact/src/index.ts:94 · packages/xstate-store-solid/src/index.ts:29 · packages/xstate-store-vue/src/index.ts:23 — the 3 copies are spread across 3 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 (19 lines × 3 locations) packages/xstate-effect/src/effectLogic.ts:395— packages/xstate-effect/src/effectLogic.ts:395 · packages/xstate-effect/src/effectLogic.ts:588 · packages/xstate-effect/src/effectLogic.ts:731 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (17 lines × 2 locations) packages/core/src/machineSchemas.ts:32— packages/core/src/machineSchemas.ts:32 · packages/core/src/validation/index.ts:374 — 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 (16 matched lines × 2 locations) · ×1
Duplicated block with local edits (16 matched lines × 2 locations) packages/core/src/remoteActorRef.ts:123— packages/core/src/remoteActorRef.ts:123 · packages/core/src/remoteActorRef.ts:237 — the two spans are one implementation copied and then locally edited — 56 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 (15 lines × 2 locations) packages/xstate-effect/src/setupEffect.ts:505— packages/xstate-effect/src/setupEffect.ts:505 · packages/xstate-effect/src/setupEffect.ts:536 — 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.
Duplicated block (14 lines × 2 locations) packages/core/src/actors/callback.ts:255— packages/core/src/actors/callback.ts:255 · packages/core/src/actors/observable.ts:250 — 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.
Boundary violation [package:test-cross-package-internals] scripts/typecheck-fixtures/fsm-only-consumer.ts:5— scripts/typecheck-fixtures/fsm-only-consumer.ts:5 reaches past another workspace package's public entry into its internals with a relative path (../../packages/core/src/fsm/index.ts) — 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.
Complex function executeActions (cyclomatic 123, cognitive 319) REDACTED:1614— executeActions has cyclomatic complexity 123 and cognitive complexity 319; 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 propertyTest (cyclomatic 72, cognitive 99) packages/xstate-test/src/engine/propertyTest.ts:3432— propertyTest has cyclomatic complexity 72 and cognitive complexity 99; 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 enqueueActions (cyclomatic 70, cognitive 95) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:667— enqueueActions has cyclomatic complexity 70 and cognitive complexity 95; 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 enterStates (cyclomatic 67, cognitive 152) packages/core/src/stateUtils.ts:1641— enterStates has cyclomatic complexity 67 and cognitive complexity 152; 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 validatePersistedSnapshot (cyclomatic 67, cognitive 103) packages/core/src/persistedSnapshotValidation.ts:102— validatePersistedSnapshot has cyclomatic complexity 67 and cognitive complexity 103; 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 toStateNodeJSON (cyclomatic 59, cognitive 87) REDACTED:530— toStateNodeJSON has cyclomatic complexity 59 and cognitive complexity 87; 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 restoreMachineSnapshot (cyclomatic 52, cognitive 81) packages/core/src/persist/index.ts:171— restoreMachineSnapshot has cyclomatic complexity 52 and cognitive complexity 81; 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 fromZodDef (cyclomatic 45, cognitive 28) packages/xstate-test/src/schema.ts:1056— fromZodDef has cyclomatic complexity 45 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 testPaths (cyclomatic 43, cognitive 60) packages/xstate-test/src/engine/testPaths.ts:605— testPaths has cyclomatic complexity 43 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 getZodChecks (cyclomatic 43, cognitive 25) packages/xstate-test/src/schema.ts:243— getZodChecks has cyclomatic complexity 43 and cognitive complexity 25; 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 zodStringArbitrary (cyclomatic 40, cognitive 37) packages/xstate-test/src/schema.ts:830— zodStringArbitrary has cyclomatic complexity 40 and cognitive complexity 37; 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 resolveActionsWithContext (cyclomatic 37, cognitive 70) packages/core/src/transitionActions.ts:1254— resolveActionsWithContext has cyclomatic complexity 37 and cognitive complexity 70; 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 mapAction (cyclomatic 37, cognitive 46) REDACTED:216— mapAction has cyclomatic complexity 37 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 getPersistedSnapshot (cyclomatic 36, cognitive 57) packages/core/src/State.ts:765— getPersistedSnapshot has cyclomatic complexity 36 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 deepEqual (cyclomatic 33, cognitive 44) packages/xstate-test/src/engine/propertyTest.ts:1064— deepEqual has cyclomatic complexity 33 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function visitState (cyclomatic 32, cognitive 46) packages/xstate-codemod/src/transforms/lower-actions.ts:393— visitState has cyclomatic complexity 32 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 visitState (cyclomatic 31, cognitive 33) packages/xstate-codemod/src/transforms/report-action-shapes.ts:118— visitState has cyclomatic complexity 31 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 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 macrostep (cyclomatic 30, cognitive 45) packages/core/src/stateUtils.ts:2476— macrostep has cyclomatic complexity 30 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 restore (cyclomatic 30, cognitive 38) packages/core/src/durable/index.ts:831— restore has cyclomatic complexity 30 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 replayTest (cyclomatic 30, cognitive 31) packages/xstate-test/src/engine/propertyTest.ts:4253— replayTest has cyclomatic complexity 30 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function creator (cyclomatic 30, cognitive 28) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:557— creator has cyclomatic complexity 30 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 microstep (cyclomatic 28, cognitive 40) packages/core/src/stateUtils.ts:1379— microstep has cyclomatic complexity 28 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 hotSwapActorLogic (cyclomatic 28, cognitive 35) packages/core/src/hotSwap.ts:31— hotSwapActorLogic has cyclomatic complexity 28 and cognitive complexity 35; 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 checkMetadata (cyclomatic 27, cognitive 43) packages/xstate-effect/src/persistence.ts:202— checkMetadata has cyclomatic complexity 27 and cognitive complexity 43; 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 verifyCli (cyclomatic 27, cognitive 42) packages/xstate-codemod/src/verify/cli.ts:110— verifyCli has cyclomatic complexity 27 and cognitive complexity 42; 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 guard (cyclomatic 26, cognitive 42) packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:346— guard has cyclomatic complexity 26 and cognitive complexity 42; 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 checkSnapshot (cyclomatic 26, cognitive 38) packages/xstate-effect/src/persistence.ts:110— checkSnapshot has cyclomatic complexity 26 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.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 26, cognitive 34) · ×1
Complex function run (cyclomatic 26, cognitive 34) packages/core/bin/agent.js:178— run has cyclomatic complexity 26 and cognitive complexity 34; 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 26, cognitive 29) packages/core/src/createActor.ts:460— (anonymous) 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 resolveStringConstant (cyclomatic 26, cognitive 29) packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:319— resolveStringConstant 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 settleSources (cyclomatic 25, cognitive 59) packages/xstate-store/src/atom.ts:58— settleSources has cyclomatic complexity 25 and cognitive complexity 59; 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 assertStateNode (cyclomatic 25, cognitive 30) packages/core/src/machineFromJSON.ts:678— assertStateNode has cyclomatic complexity 25 and cognitive complexity 30; 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 checkStateNode (cyclomatic 24, cognitive 42) packages/core/src/devDiagnostics.ts:174— checkStateNode has cyclomatic complexity 24 and cognitive complexity 42; 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 checkTemporal (cyclomatic 24, cognitive 42) packages/xstate-test/src/engine/propertyTest.ts:2387— checkTemporal has cyclomatic complexity 24 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 24, cognitive 36) · ×1
Complex function main (cyclomatic 24, cognitive 36) packages/xstate-codemod/src/cli.ts:112— main has cyclomatic complexity 24 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 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 checkJson (cyclomatic 24, cognitive 30) packages/xstate-effect/src/persistence.ts:43— checkJson has cyclomatic complexity 24 and cognitive complexity 30; 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 assertStateNode (cyclomatic 24, cognitive 29) REDACTED:733— assertStateNode has cyclomatic complexity 24 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 planMachines (cyclomatic 23, cognitive 46) packages/xstate-codemod/src/transforms/lower-actions.ts:248— planMachines has cyclomatic complexity 23 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 evaluateExpr (cyclomatic 23, cognitive 33) REDACTED:897— evaluateExpr has cyclomatic complexity 23 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 22, cognitive 45) · ×1
Complex function run (cyclomatic 22, cognitive 45) packages/xstate-test/src/engine/testPaths.ts:421— run has cyclomatic complexity 22 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/core/src/setup.ts: 5460 lines of code packages/core/src/setup.ts:1— packages/core/src/setup.ts has 5460 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/xstate-test/src/engine/propertyTest.ts · ×1
packages/xstate-test/src/engine/propertyTest.ts: 4516 lines of code packages/xstate-test/src/engine/propertyTest.ts:1— packages/xstate-test/src/engine/propertyTest.ts has 4516 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/core/src/types.ts: 3405 lines of code packages/core/src/types.ts:1— packages/core/src/types.ts has 3405 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/core/src/stateUtils.ts · ×1
packages/core/src/stateUtils.ts: 2848 lines of code packages/core/src/stateUtils.ts:1— packages/core/src/stateUtils.ts has 2848 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/core/src/types.v6.ts · ×1
packages/core/src/types.v6.ts: 2521 lines of code packages/core/src/types.v6.ts:1— packages/core/src/types.v6.ts has 2521 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: 2443 lines of code REDACTED:1— REDACTED has 2443 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/core/src/createActor.ts · ×1
packages/core/src/createActor.ts: 1357 lines of code packages/core/src/createActor.ts:1— packages/core/src/createActor.ts has 1357 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/xstate-test/src/schema.ts · ×1
packages/xstate-test/src/schema.ts: 1330 lines of code packages/xstate-test/src/schema.ts:1— packages/xstate-test/src/schema.ts has 1330 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/core/src/StateMachine.ts · ×1
packages/core/src/StateMachine.ts: 1326 lines of code packages/core/src/StateMachine.ts:1— packages/core/src/StateMachine.ts has 1326 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/core/src/transitionActions.ts · ×1
packages/core/src/transitionActions.ts: 1325 lines of code packages/core/src/transitionActions.ts:1— packages/core/src/transitionActions.ts has 1325 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/xstate-codemod/src/transforms/lower-actions/codegen.ts · ×1
packages/xstate-codemod/src/transforms/lower-actions/codegen.ts: 1319 lines of code packages/xstate-codemod/src/transforms/lower-actions/codegen.ts:1— packages/xstate-codemod/src/transforms/lower-actions/codegen.ts has 1319 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/core/src/machineFromJSON.ts · ×1
packages/core/src/machineFromJSON.ts: 1257 lines of code packages/core/src/machineFromJSON.ts:1— packages/core/src/machineFromJSON.ts has 1257 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/core/src/systemTransition.ts · ×1
packages/core/src/systemTransition.ts: 1194 lines of code packages/core/src/systemTransition.ts:1— packages/core/src/systemTransition.ts has 1194 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/xstate-test/src/engine/coverage.ts · ×1
packages/xstate-test/src/engine/coverage.ts: 1134 lines of code packages/xstate-test/src/engine/coverage.ts:1— packages/xstate-test/src/engine/coverage.ts has 1134 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/core/src/system.ts · ×1
packages/core/src/system.ts: 1104 lines of code packages/core/src/system.ts:1— packages/core/src/system.ts has 1104 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/core/src/durable/index.ts · ×1
packages/core/src/durable/index.ts: 1044 lines of code packages/core/src/durable/index.ts:1— packages/core/src/durable/index.ts has 1044 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/xstate-store/src/persist.ts · ×1
packages/xstate-store/src/persist.ts: 1013 lines of code packages/xstate-store/src/persist.ts:1— packages/xstate-store/src/persist.ts has 1013 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/xstate-test/src/engine/testPaths.ts · ×1
packages/xstate-test/src/engine/testPaths.ts: 997 lines of code packages/xstate-test/src/engine/testPaths.ts:1— packages/xstate-test/src/engine/testPaths.ts has 997 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/core/src/State.ts: 981 lines of code packages/core/src/State.ts:1— packages/core/src/State.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.
REDACTED: 975 lines of code REDACTED:1— REDACTED has 975 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/xstate-test/src/engine/report.ts · ×1
packages/xstate-test/src/engine/report.ts: 890 lines of code packages/xstate-test/src/engine/report.ts:1— packages/xstate-test/src/engine/report.ts has 890 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/xstate-store/src/store.ts · ×1
packages/xstate-store/src/store.ts: 807 lines of code packages/xstate-store/src/store.ts:1— packages/xstate-store/src/store.ts has 807 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/xstate-effect/src/effectLogic.ts · ×1
packages/xstate-effect/src/effectLogic.ts: 747 lines of code packages/xstate-effect/src/effectLogic.ts:1— packages/xstate-effect/src/effectLogic.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/core/src/StateNode.ts · ×1
packages/core/src/StateNode.ts: 736 lines of code packages/core/src/StateNode.ts:1— packages/core/src/StateNode.ts 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/xstate-codemod/src/transforms/lower-actions.ts · ×1
packages/xstate-codemod/src/transforms/lower-actions.ts: 718 lines of code packages/xstate-codemod/src/transforms/lower-actions.ts:1— packages/xstate-codemod/src/transforms/lower-actions.ts has 718 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/xstate-store/src/types.ts · ×1
packages/xstate-store/src/types.ts: 714 lines of code packages/xstate-store/src/types.ts:1— packages/xstate-store/src/types.ts has 714 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/xstate-test/src/playwright.ts · ×1
packages/xstate-test/src/playwright.ts: 646 lines of code packages/xstate-test/src/playwright.ts:1— packages/xstate-test/src/playwright.ts has 646 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/xstate-codemod/src/transforms/lower-actions/analysis.ts · ×1
packages/xstate-codemod/src/transforms/lower-actions/analysis.ts: 638 lines of code packages/xstate-codemod/src/transforms/lower-actions/analysis.ts:1— packages/xstate-codemod/src/transforms/lower-actions/analysis.ts has 638 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/xstate-store/src/atom.ts · ×1
packages/xstate-store/src/atom.ts: 629 lines of code packages/xstate-store/src/atom.ts:1— packages/xstate-store/src/atom.ts has 629 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/xstate-store/src/alien.ts · ×1
packages/xstate-store/src/alien.ts: 600 lines of code packages/xstate-store/src/alien.ts:1— packages/xstate-store/src/alien.ts has 600 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/core/src/actors/observable.ts · ×1
packages/core/src/actors/observable.ts: 559 lines of code packages/core/src/actors/observable.ts:1— packages/core/src/actors/observable.ts has 559 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/xstate-effect/src/setupEffect.ts · ×1
packages/xstate-effect/src/setupEffect.ts: 554 lines of code packages/xstate-effect/src/setupEffect.ts:1— packages/xstate-effect/src/setupEffect.ts has 554 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/core/src/actors/logic.ts · ×1
packages/core/src/actors/logic.ts: 551 lines of code packages/core/src/actors/logic.ts:1— packages/core/src/actors/logic.ts has 551 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/core/src/actors/promise.ts · ×1
packages/core/src/actors/promise.ts: 545 lines of code packages/core/src/actors/promise.ts:1— packages/core/src/actors/promise.ts has 545 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/core/src/machineVersions.ts · ×1
packages/core/src/machineVersions.ts: 528 lines of code packages/core/src/machineVersions.ts:1— packages/core/src/machineVersions.ts has 528 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/core/src/persist/index.ts · ×1
packages/core/src/persist/index.ts: 502 lines of code packages/core/src/persist/index.ts:1— packages/core/src/persist/index.ts has 502 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/xstate-test/src/adapter.ts · ×1
packages/xstate-test/src/adapter.ts: 489 lines of code packages/xstate-test/src/adapter.ts:1— packages/xstate-test/src/adapter.ts has 489 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/core/src/fsm.ts: 488 lines of code packages/core/src/fsm.ts:1— packages/core/src/fsm.ts has 488 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/xstate-effect/src/createEffectActor.ts · ×1
packages/xstate-effect/src/createEffectActor.ts: 466 lines of code packages/xstate-effect/src/createEffectActor.ts:1— packages/xstate-effect/src/createEffectActor.ts has 466 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/core/src/utils.ts: 464 lines of code packages/core/src/utils.ts:1— packages/core/src/utils.ts has 464 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 (~196 LoC) scripts/check-built-types.mjs— no import path from any entry point (178 application, 40 tooling, 416 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 (~39 LoC) scripts/release.js— no import path from any entry point (178 application, 40 tooling, 416 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 '@typescript/native' package.json:93— Declared in the root 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 'knip' package.json:99— Declared in the root 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 'tslib' templates/svelte-ts/package.json:17— Declared in templates/svelte-ts/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.
Swallowed exception (caught, then discarded) packages/core/src/State.ts:79— `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.
Disabled test packages/core/src/graph/test/graph.test.ts:239— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/src/graph/test/graph.test.ts:245— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/src/graph/test/graph.test.ts:564— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actions.test.ts:1760— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actions.test.ts:1901— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actions.test.ts:2040— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actions.test.ts:2588— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actions.test.ts:3536— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actorLogic.test.ts:766— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actorLogic.test.ts:1131— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/actorLogic.test.ts:1404— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/after.test.ts:480— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/emit.test.ts:508— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/guards.test.ts:637— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/guards.test.ts:694— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/history.test.ts:416— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/history.test.ts:517— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/history.test.ts:560— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/interpreter.test.ts:622— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/interpreter.test.ts:1900— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/interpreter.test.ts:1932— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/invoke.test.ts:442— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/invoke.test.ts:517— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/invoke.test.ts:3180— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/core/test/invoke.test.ts:3719— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Duplicated predicate packages/core/src/validation/index.ts:434— `!!value && typeof (value as any).then === 'function'` appears character-identically in 3 files — packages/core/src/validation/index.ts, packages/xstate-store/src/store.ts, packages/xstate-store/src/validate.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/core/src/machineFromJSON.ts:240— `!!value && typeof value === 'object' && typeof (value as any)['@code'] === 'string'` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/core/src/machineFromJSON.ts:232— `!!value && typeof value === 'object' && typeof (value as any)['@expr'] === 'string'` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/core/src/serialize.ts:101— `!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null` appears character-identically in 2 files — packages/core/src/serialize.ts, packages/xstate-effect/src/persistence.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/xstate-react/src/shallowEqual.ts:30— `!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])` appears character-identically in 2 files — packages/xstate-react/src/shallowEqual.ts, packages/xstate-store/src/shallowEqual.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/core/src/machineFromJSON.ts:607— `!action || typeof action.type !== 'string'` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/core/src/machineFromJSON.ts:1325— `!isResolvable(action) && action.type.startsWith('@xstate.')` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/xstate-codemod/src/transforms/lower-actions.ts:402— `!key || !Node.isPropertyAssignment(property)` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions.ts, packages/xstate-codemod/src/transforms/report-action-shapes.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/xstate-codemod/src/transforms/lower-actions.ts:395— `!state || !Node.isObjectLiteralExpression(state)` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions.ts, packages/xstate-codemod/src/transforms/report-action-shapes.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/xstate-codemod/src/transforms/lower-actions.ts:383— `!value || !Node.isObjectLiteralExpression(value)` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions.ts, packages/xstate-codemod/src/transforms/report-action-shapes.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/core/src/StateMachine.ts:856— `((actorScope.self as any)._collectedMicrosteps as any[]) || []` appears character-identically in 2 files — packages/core/src/StateMachine.ts, packages/core/src/stateUtils.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/core/src/symbolObservable.ts:2— `(typeof Symbol === 'function' && Symbol.observable) || '@@observable'` appears character-identically in 3 files — packages/core/src/symbolObservable.ts, packages/xstate-effect/src/effectActor.ts, packages/xstate-store/src/store.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/xstate-codemod/src/transforms/lower-actions/analysis.ts:119— `Node.isIdentifier(value) && resolveIdentifier(value) === 'fn'` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions/analysis.ts, packages/xstate-codemod/src/transforms/lower-actions/codegen.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/xstate-codemod/src/transforms/lower-actions/analysis.ts:322— `Node.isStringLiteral(value) || Node.isNoSubstitutionTemplateLiteral(value)` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions/analysis.ts, packages/xstate-codemod/src/transforms/lower-actions/codegen.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/core/src/machineFromJSON.ts:746— `Number.isNaN(Number(delay)) && parseDelayToMilliseconds(delay) === undefined && !json.delays?.[delay] && !resolvedSources.delays[delay]` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/core/src/serialize.ts:215— `Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null` appears character-identically in 2 files — packages/core/src/serialize.ts, packages/core/src/systemTransition.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/core/src/machineFromJSON.ts:465— `branch.when === undefined && index !== choice.length - 1` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/xstate-codemod/src/transforms/lower-actions/analysis.ts:243— `decls.length !== 1 || !Node.isVariableDeclaration(decls[0])` appears character-identically in 2 files — packages/xstate-codemod/src/transforms/lower-actions/analysis.ts, packages/xstate-codemod/src/transforms/lower-actions/codegen.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/core/src/machineFromJSON.ts:794— `delay && typeof delay === 'object' && 'duration' in delay` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/core/src/machineSchemas.ts:176— `event.type.startsWith('xstate.') || event.type.startsWith('@xstate.')` appears character-identically in 2 files — packages/core/src/machineSchemas.ts, packages/core/src/validation/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/core/src/machineFromJSON.ts:687— `node.type === 'history' || node.history !== undefined` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/xstate-store-preact/src/index.ts:144— `previous.current !== undefined && compare(previous.current, next)` appears character-identically in 2 files — packages/xstate-store-preact/src/index.ts, packages/xstate-store-react/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/core/src/createActor.ts:505— `result && typeof (result as PromiseLike<unknown>).then === 'function'` appears character-identically in 2 files — packages/core/src/createActor.ts, packages/xstate-effect/src/createEffectActor.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/core/src/machineFromJSON.ts:689— `typeof node.target === 'string' && node.target.trim().length > 0` appears character-identically in 2 files — packages/core/src/machineFromJSON.ts, REDACTED. 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/xstate-react/src/shallowEqual.ts:15— `typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null` appears character-identically in 2 files — packages/xstate-react/src/shallowEqual.ts, packages/xstate-store/src/shallowEqual.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.
Mock-dominated test: defers startup and observer calls until mount, then cleans up on unmount packages/xstate-vue/test/scope-lifecycle.test.ts:95— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 6 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 not start an actor whose owning scope was disposed before mount packages/xstate-vue/test/scope-lifecycle.test.ts:115— 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: reports a rejected initial async read (%s) packages/xstate-store/test/persist.test.ts:284— 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: activates a source introduced into an existing subscription packages/xstate-store/test/sourceAtom.test.ts:359— 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: should not attempt to deliver a delayed event to the spawned actor's ID that was stopped since the event was scheduled packages/core/test/actions.test.ts:3467— This test sets up 3 test doubles (for example `vi.spyOn`) 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 same runtime contract in createActor packages/core/test/custom-interpreter.test.ts:848— This test sets up 3 test doubles (for example `vi.spyOn`) 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: reattaches a JSON-restored callback and cleans up each incarnation packages/core/test/restored-effects.test.ts:10— 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: drains all attachment cleanups once when the first throws packages/core/test/restored-effects.test.ts:134— This test sets up 3 test doubles (for example `vi.fn`) against 1 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: forwards the host runtime to custom effects packages/core/test/durable-adapters/inngest.test.ts:131— 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.
Deprecated: eslint REDACTED:8301— eslint 9.39.5 is resolved in REDACTED and is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:8573— glob 10.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:8578— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: inflight REDACTED:8719— inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: react-loading-overlay-ts REDACTED:9818— react-loading-overlay-ts 2.0.2 is resolved in REDACTED and is marked deprecated by its publisher: "This library won't work on react v19. Please use @achmadk/react-loading-overlay instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: sourcemap-codec REDACTED:10204— sourcemap-codec 1.4.8 is resolved in REDACTED and is marked deprecated by its publisher: "Please use @jridgewell/sourcemap-codec instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: whatwg-encoding REDACTED:10941— whatwg-encoding 3.1.1 is resolved in REDACTED and is marked deprecated by its publisher: "Use @exodus/bytes instead for a more spec-conformant and faster implementation". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
IC1 · Incompleteness & stubs· Empty method body · ×5
Empty method body packages/core/src/remoteActorRef.ts:12— `unsubscribe` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/core/src/systemTransition.ts:199— `systemLogger` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/xstate-effect/src/actor.ts:61— `unsubscribe` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/xstate-store/src/persist.ts:143— `setItem` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/xstate-store/src/persist.ts:144— `removeItem` has an empty body — confirm it's an intentional no-op and not an unfinished method.
redundant comment packages/core/src/machineFromJSON.ts:851— "Same check as `snapshot.matches('#id')`." repeats the code it sits on: 4 of its 4 words (check, snapshot, matches, id) are already in `return (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:1168— "Same check as `snapshot.matches('#id')`." repeats the code it sits on: 4 of its 4 words (check, snapshot, matches, id) are already in `return (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/update-example-links.js:26— "Read the file contents with fs.readFileSync" repeats the code it sits on: 5 of its 5 words (read, file, contents, fs, sync) are already in `const readmeContents = fs.readFileSync(readmeFile, 'utf8');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/update-example-links.js:54— "Write the updated contents back to the file" repeats the code it sits on: 4 of its 5 words (write, updated, contents, file) are already in `fs.writeFileSync(readmeFile, updatedReadmeContents);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Outdated (npm): husky package.json:98— husky is pinned at 3.1.0; registry.npmjs.org publishes 9.1.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): ts-morph packages/xstate-codemod/package.json:36— ts-morph is pinned at 24.0.0; registry.npmjs.org publishes 28.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 64 significant file(s) lose their only recent owner: packages/xstate-test/src/engine/propertyTest.ts, packages/core/src/types.ts, packages/core/src/stateUtils.ts, REDACTED, packages/core/src/types.v6.ts, packages/core/src/systemTransition.ts, packages/core/src/transitionActions.ts, packages/core/src/durable/index.ts (+56 more). Pair on, review, or document these before any departure.
Documentation: no build, run or usage example packages/xstate-codemod/README.md:1— `xstate-codemod` is a command-line package (`bin` in `package.json`) and neither `packages/xstate-codemod/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/xstate-codemod/package.json:15— 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/xstate-codemod/package.json` makes this repository a deployable product (line 15).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion packages/core/package.json:1— `packages/core` (36463 LoC, 262 module-visible types across 7 directories) overshoots its size bounds. 1 of 16 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 8.8/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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 130 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 130 of the 242 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: packages/xstate-solid/src/createImmutable.ts. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Orphaned file packages/xstate-solid/src/createImmutable.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.
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.
README/code drift packages/xstate-vue/README.md:10— packages/xstate-vue/README.md names Vue 2, but the manifest declares `vue` ^3.5.29. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, 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.
No SAST REDACTED:4— No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation package.json:81— `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Unused export 'childMain' packages/xstate-codemod/src/verify/child.ts:197— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/xstate-codemod/src/verify/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/xstate-codemod/src/verify/index.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'shallowEqual' packages/xstate-store/src/shallowEqual.ts:10— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/xstate-store/src/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/xstate-store/src/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused module-local declaration '_GroupTestValues' · ×1
Unused module-local declaration '_GroupTestValues' packages/core/src/createMachine.ts:81— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'toPortableJSON' · ×1
Unused module-local declaration 'toPortableJSON' packages/core/test/conversion.test.ts:6— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration '_NotExported' · ×1
Unused module-local declaration '_NotExported' packages/core/test/publicTypes.types.test.ts:5— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration '_StillExported' · ×1
Unused module-local declaration '_StillExported' packages/core/test/publicTypes.types.test.ts:35— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R8 · Dependency Hygiene· Test-only dependency 'xstate5' in production deps · ×1
Test-only dependency 'xstate5' in production deps packages/xstate-codemod/package.json:39— Only test files import it (first: packages/xstate-codemod/test/lower-actions.test.ts:3) — move it to devDependencies.
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 — 130/137 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 — ~3.4 `!` null assertions per 1k TypeScript source lines — 213 assertion(s) across the 61757 source line(s) of the 192 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: REDACTED (28), packages/core/src/stateUtils.ts (17), packages/core/src/transitionActions.ts (15). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Silent fallback default in catch packages/xstate-test/src/failures.ts:86— `createTestFailureStore.load` 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.
Outdated (npm): @babel/core — @babel/core is pinned at 7.29.7; registry.npmjs.org publishes 8.1.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @babel/plugin-transform-class-static-block — @babel/plugin-transform-class-static-block is pinned at 7.29.7; registry.npmjs.org publishes 8.1.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @babel/preset-env — @babel/preset-env is pinned at 7.29.7; registry.npmjs.org publishes 8.0.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @babel/preset-react — @babel/preset-react is pinned at 7.29.7; registry.npmjs.org publishes 8.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @babel/preset-typescript — @babel/preset-typescript is pinned at 7.29.7; registry.npmjs.org publishes 8.0.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @changesets/cli — @changesets/cli is pinned at 3.0.0; registry.npmjs.org publishes 3.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @effect/atom-react — @effect/atom-react is pinned at 4.0.6; registry.npmjs.org publishes 4.1.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @manypkg/cli — @manypkg/cli is pinned at 0.22.0; registry.npmjs.org publishes 0.25.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @oxlint/plugins — @oxlint/plugins is pinned at 1.83.0; registry.npmjs.org publishes 1.94.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @preconstruct/cli — @preconstruct/cli is pinned at 2.8.13; registry.npmjs.org publishes 2.9.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @statelyai/sdk — @statelyai/sdk is pinned at 0.20.3; registry.npmjs.org publishes 0.48.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @types/node — @types/node is pinned at 25.2.1; registry.npmjs.org publishes 26.6.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @vitest/coverage-istanbul — @vitest/coverage-istanbul is pinned at 3.2.7; registry.npmjs.org publishes 5.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): axios — axios is pinned at 1.19.0; registry.npmjs.org publishes 1.21.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): babel-preset-solid — babel-preset-solid is pinned at 1.9.12; registry.npmjs.org publishes 1.9.19 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): bootstrap — bootstrap is pinned at 5.3.8; registry.npmjs.org publishes 5.3.9 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): effect — effect is pinned at 4.0.6; registry.npmjs.org publishes 4.1.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): eslint-plugin-jsdoc — eslint-plugin-jsdoc is pinned at 63.3.2; registry.npmjs.org publishes 65.4.9 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): express — express is pinned at 5.2.1; registry.npmjs.org publishes 5.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): happy-dom — happy-dom is pinned at 20.14.5; registry.npmjs.org publishes 21.0.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): knip — knip is pinned at 6.27.0; registry.npmjs.org publishes 6.45.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): lint-staged — lint-staged is pinned at 16.4.0; registry.npmjs.org publishes 17.6.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): mongodb — mongodb is pinned at 6.21.0; registry.npmjs.org publishes 7.9.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): next — next is pinned at 15.5.25; registry.npmjs.org publishes 16.4.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): oxfmt — oxfmt is pinned at 0.61.0; registry.npmjs.org publishes 0.79.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Skipped (documented): should persist and restore a nested machine packages/core/test/actorLogic.test.ts:1240— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
Skipped (documented): (unnamed test) packages/core/test/inertActorScope.test.ts:70— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/core/test/inspectionSent.test.ts:229— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): should immediately reject for an actor that had an error packages/core/test/toPromise.test.ts:131— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
Skipped (documented): delayed raise actions should be returned packages/core/test/transition.test.ts:829— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
doc comments repeat the names packages/xstate-effect/src/actor.ts:49— 0 of 0 documented parameters and 2 of 103 summaries in `@xstate/effect` only repeat the member or parameter name (e.g. "Options for ." for `WaitForOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/xstate-store/src/atom.ts:200— 0 of 9 documented parameters and 1 of 109 summaries in `@xstate/store` only repeat the member or parameter name (e.g. "The current state of an async atom." for `AsyncAtomState`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/xstate-test/src/engine/report.ts:9— 0 of 0 documented parameters and 4 of 516 summaries in `@xstate/test` only repeat the member or parameter name (e.g. "Options for ." for `FormatTestCoverageOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/core/src/StateMachine.ts:600— 8 of 60 documented parameters and 2 of 582 summaries in `xstate` only repeat the member or parameter name (e.g. "The current snapshot" for `snapshot`). 3 documentation tag(s) are empty. 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 35 file(s) — `packages/core/src/State.ts`, `packages/core/src/StateMachine.ts`, `packages/core/src/actors/callback.ts`, `packages/core/src/actors/logic.ts`, `packages/core/src/actors/observable.ts`, … (+30 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e5df-741f-7f2b-b6e6-767e17a6e63a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 228 · Warnings: 1123 · Recommendations: 133 · Info: 52 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 19:39 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.