Public report of cipherstash/stack, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 04:28 UTC · Survey ID cd_c151e3d210504e78bdfa32d137263e54
cipherstash/stack
Measured 17 November 2026, 04:26 UTC, at code version fa5cc03
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureTestRunFailed).
CAI scoreStrong
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 160,501 lines of product code in 46 projects, tests not counted · Estimated rebuild effort: about 4.2 person-years · Weakest lens: Code Health, 63.4
Findings by how serious they are
123 critical974 serious173 minor
9 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 04:26 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.
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 ▸
81of 81 dimensions measured by tools.
1233of 1270 findings point to an exact file and line, so you can open each one in the code. The other 37 concern the repository as a whole, such as missing documentation.
81dimensions across 7 lenses, read from 160,501 lines of product code in 46 projects.
cipherstash/stack meets our standard for production. It scores 70.2 out of 100 and is rated Strong, and 116 of its 123 critical findings are security problems.
Code Health, at 63.4, is the weakest lens and counts most in the score. The best first step is simplifying the most tangled methods, worth about 3.7 points. Writing log messages as searchable templates would lift Code Health itself, worth about 1.9 points. Raising Code Health to 70 would lift the score to about 73.2.
Eighty-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twenty-three pipeline steps install packages that can change without warning, and four secrets can leak from the build pipeline. Pinning each tool to an exact version, pinning what the pipeline installs and limiting each secret to its own step would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code, and the two unsafe settings in infrastructure or container files need changing to safe values. The three parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 160,501 lines, about €610,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 63.4 to 70, the lowest score rated Strong, the score would rise from 70.2 to about 73.2.
Code composition: what the lines of code are
Product code 40%Tests 60%
Rebuild cost: about €610,000 · Estimate
Cost to rebuild
€200,000 to €1,000,000, for 3,375 to 10,708 hours of work, about 4.2 person-years for 2 to 8 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×1.0 at a score of 70. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 160,501 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
Bring the 69 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with query-filters.applyFilters (cyclomatic 51), gensupport.convert (cyclomatic 47), xml-to-markdown.process_function (cyclomatic 46).
Raises the score by about 1.9 points · Medium effort · Structured logging
3
Swallowed exception (empty catch)
Raises the score by about 1.6 points · Medium effort · Exception handling
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 €610,000 to build again, about 4.2 person-years of work. Its weakest lens is Code Health, at 63.4 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Bring the 69 bodies over 15 down to 15 or less in Cyclomatic Complexity. Of all the actions in this report, it raises the score most for the work it takes: about 3.7 points for high effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
371 modules, with 539 dependencies between them. 4 loops run through 19 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 331 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.
2 pairs of types, where a type in languages.typescript.packages.cli.src.commands.decrypt uses a type in languages.typescript.packages.migrate.src.column-migration.
languages.typescript.packages.cli.src.commands.decrypt uses languages.typescript.packages.migrate.src.column-migration, so a change to languages.typescript.packages.migrate.src.column-migration can break languages.typescript.packages.cli.src.commands.decrypt, while a change to languages.typescript.packages.cli.src.commands.decrypt can't break languages.typescript.packages.migrate.src.column-migration.
Position
Below the diagonal: languages.typescript.packages.cli.src.commands.decrypt uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.cli.src.commands.init.types uses a type in languages.typescript.packages.cli.src.commands.init.utils.
languages.typescript.packages.cli.src.commands.init.types uses languages.typescript.packages.cli.src.commands.init.utils, so a change to languages.typescript.packages.cli.src.commands.init.utils can break languages.typescript.packages.cli.src.commands.init.types, while a change to languages.typescript.packages.cli.src.commands.init.types can't break languages.typescript.packages.cli.src.commands.init.utils.
Position
Below the diagonal: languages.typescript.packages.cli.src.commands.init.types uses a module listed above it, which is the healthy direction.
languages.typescript.packages.migrate.src uses languages.typescript.packages.migrate.src.column-migration, so a change to languages.typescript.packages.migrate.src.column-migration can break languages.typescript.packages.migrate.src, while a change to languages.typescript.packages.migrate.src can't break languages.typescript.packages.migrate.src.column-migration.
Position
Below the diagonal: languages.typescript.packages.migrate.src uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack-prisma.src.execution.envelope-base uses a type in languages.typescript.packages.stack-prisma.src.execution.sdk.
languages.typescript.packages.stack-prisma.src.execution.envelope-base uses languages.typescript.packages.stack-prisma.src.execution.sdk, so a change to languages.typescript.packages.stack-prisma.src.execution.sdk can break languages.typescript.packages.stack-prisma.src.execution.envelope-base, while a change to languages.typescript.packages.stack-prisma.src.execution.envelope-base can't break languages.typescript.packages.stack-prisma.src.execution.sdk.
Position
Below the diagonal: languages.typescript.packages.stack-prisma.src.execution.envelope-base uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption.operations.base-operation uses a type in languages.typescript.packages.stack.src.errors.
languages.typescript.packages.stack.src.encryption.operations.base-operation uses languages.typescript.packages.stack.src.errors, so a change to languages.typescript.packages.stack.src.errors can break languages.typescript.packages.stack.src.encryption.operations.base-operation, while a change to languages.typescript.packages.stack.src.encryption.operations.base-operation can't break languages.typescript.packages.stack.src.errors.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.base-operation uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack.src.identity uses languages.typescript.packages.stack.src.errors, so a change to languages.typescript.packages.stack.src.errors can break languages.typescript.packages.stack.src.identity, while a change to languages.typescript.packages.stack.src.identity can't break languages.typescript.packages.stack.src.errors.
Position
Below the diagonal: languages.typescript.packages.stack.src.identity uses a module listed above it, which is the healthy direction.
stack_encrypt.descriptor uses stack_profile.diagnostic, so a change to stack_profile.diagnostic can break stack_encrypt.descriptor, while a change to stack_encrypt.descriptor can't break stack_profile.diagnostic.
Position
Below the diagonal: stack_encrypt.descriptor uses a module listed above it, which is the healthy direction.
24→34 stack_encrypt.keyset uses stack_encrypt.cipherpart of a loop✕
Connections
1 pair of types, where a type in stack_encrypt.keyset uses a type in stack_encrypt.cipher.
stack_encrypt.keyset uses stack_encrypt.cipher, so a change to stack_encrypt.cipher can break stack_encrypt.keyset, while a change to stack_encrypt.keyset can't break stack_encrypt.cipher.
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.
1 pair of types, where a type in languages.typescript.packages.cli.src.commands.init.lib uses a type in languages.typescript.packages.cli.src.commands.init.utils.
languages.typescript.packages.cli.src.commands.init.lib uses languages.typescript.packages.cli.src.commands.init.utils, so a change to languages.typescript.packages.cli.src.commands.init.utils can break languages.typescript.packages.cli.src.commands.init.lib, while a change to languages.typescript.packages.cli.src.commands.init.lib can't break languages.typescript.packages.cli.src.commands.init.utils.
Position
Below the diagonal: languages.typescript.packages.cli.src.commands.init.lib uses a module listed above it, which is the healthy direction.
12 pairs of types, where a type in languages.typescript.packages.cli.src.commands.init.lib uses a type in languages.typescript.packages.cli.src.commands.init.types.
languages.typescript.packages.cli.src.commands.init.lib uses languages.typescript.packages.cli.src.commands.init.types, so a change to languages.typescript.packages.cli.src.commands.init.types can break languages.typescript.packages.cli.src.commands.init.lib, while a change to languages.typescript.packages.cli.src.commands.init.lib can't break languages.typescript.packages.cli.src.commands.init.types.
Position
Below the diagonal: languages.typescript.packages.cli.src.commands.init.lib uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in languages.typescript.packages.stack-prisma.src.v3 uses a type in languages.typescript.packages.stack-prisma.src.execution.sdk.
languages.typescript.packages.stack-prisma.src.v3 uses languages.typescript.packages.stack-prisma.src.execution.sdk, so a change to languages.typescript.packages.stack-prisma.src.execution.sdk can break languages.typescript.packages.stack-prisma.src.v3, while a change to languages.typescript.packages.stack-prisma.src.v3 can't break languages.typescript.packages.stack-prisma.src.execution.sdk.
Position
Below the diagonal: languages.typescript.packages.stack-prisma.src.v3 uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in languages.typescript.packages.stack-prisma.src.v3 uses a type in languages.typescript.packages.stack.src.eql.v3.table.
languages.typescript.packages.stack-prisma.src.v3 uses languages.typescript.packages.stack.src.eql.v3.table, so a change to languages.typescript.packages.stack.src.eql.v3.table can break languages.typescript.packages.stack-prisma.src.v3, while a change to languages.typescript.packages.stack-prisma.src.v3 can't break languages.typescript.packages.stack.src.eql.v3.table.
Position
Below the diagonal: languages.typescript.packages.stack-prisma.src.v3 uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack-prisma.src.v3 uses a type in languages.typescript.packages.stack-prisma.src.execution.envelope-base.
languages.typescript.packages.stack-prisma.src.v3 uses languages.typescript.packages.stack-prisma.src.execution.envelope-base, so a change to languages.typescript.packages.stack-prisma.src.execution.envelope-base can break languages.typescript.packages.stack-prisma.src.v3, while a change to languages.typescript.packages.stack-prisma.src.v3 can't break languages.typescript.packages.stack-prisma.src.execution.envelope-base.
Position
Below the diagonal: languages.typescript.packages.stack-prisma.src.v3 uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack.src.encryption.operations.decrypt uses a type in languages.typescript.packages.protect-ffi.src.types.
languages.typescript.packages.stack.src.encryption.operations.decrypt uses languages.typescript.packages.protect-ffi.src.types, so a change to languages.typescript.packages.protect-ffi.src.types can break languages.typescript.packages.stack.src.encryption.operations.decrypt, while a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can't break languages.typescript.packages.protect-ffi.src.types.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.decrypt uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack.src.encryption.operations.decrypt uses a type in languages.typescript.packages.stack.src.errors.
languages.typescript.packages.stack.src.encryption.operations.decrypt uses languages.typescript.packages.stack.src.errors, so a change to languages.typescript.packages.stack.src.errors can break languages.typescript.packages.stack.src.encryption.operations.decrypt, while a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can't break languages.typescript.packages.stack.src.errors.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.decrypt uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption.operations.decrypt uses a type in languages.typescript.packages.stack.src.types.
languages.typescript.packages.stack.src.encryption.operations.decrypt uses languages.typescript.packages.stack.src.types, so a change to languages.typescript.packages.stack.src.types can break languages.typescript.packages.stack.src.encryption.operations.decrypt, while a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can't break languages.typescript.packages.stack.src.types.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.decrypt uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack.src.encryption.operations.decrypt uses a type in languages.typescript.packages.stack.src.encryption.operations.base-operation.
languages.typescript.packages.stack.src.encryption.operations.decrypt uses languages.typescript.packages.stack.src.encryption.operations.base-operation, so a change to languages.typescript.packages.stack.src.encryption.operations.base-operation can break languages.typescript.packages.stack.src.encryption.operations.decrypt, while a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can't break languages.typescript.packages.stack.src.encryption.operations.base-operation.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.decrypt uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack.src.encryption.operations.decrypt uses a type in languages.typescript.packages.stack.src.identity.
languages.typescript.packages.stack.src.encryption.operations.decrypt uses languages.typescript.packages.stack.src.identity, so a change to languages.typescript.packages.stack.src.identity can break languages.typescript.packages.stack.src.encryption.operations.decrypt, while a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can't break languages.typescript.packages.stack.src.identity.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.operations.decrypt uses a module listed above it, which is the healthy direction.
languages.typescript.packages.wizard.src.lib uses languages.typescript.packages.wizard.src.lib.types, so a change to languages.typescript.packages.wizard.src.lib.types can break languages.typescript.packages.wizard.src.lib, while a change to languages.typescript.packages.wizard.src.lib can't break languages.typescript.packages.wizard.src.lib.types.
Position
Below the diagonal: languages.typescript.packages.wizard.src.lib uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in languages.typescript.packages.wizard.src.lib uses a type in languages.typescript.packages.cli.src.commands.init.types.
languages.typescript.packages.wizard.src.lib uses languages.typescript.packages.cli.src.commands.init.types, so a change to languages.typescript.packages.cli.src.commands.init.types can break languages.typescript.packages.wizard.src.lib, while a change to languages.typescript.packages.wizard.src.lib can't break languages.typescript.packages.cli.src.commands.init.types.
Position
Below the diagonal: languages.typescript.packages.wizard.src.lib uses a module listed above it, which is the healthy direction.
stack_auth.auto_refresh uses stack_auth.token, so a change to stack_auth.token can break stack_auth.auto_refresh, while a change to stack_auth.auto_refresh can't break stack_auth.token.
Position
Below the diagonal: stack_auth.auto_refresh uses a module listed above it, which is the healthy direction.
29→33 stack_auth.auto_refresh uses stack_auth.errorpart of a loop✕
Connections
3 pairs of types, where a type in stack_auth.auto_refresh uses a type in stack_auth.error.
stack_auth.auto_refresh uses stack_auth.error, so a change to stack_auth.error can break stack_auth.auto_refresh, while a change to stack_auth.auto_refresh can't break stack_auth.error.
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.
stack_auth.oidc_refresher uses stack_auth, so a change to stack_auth can break stack_auth.oidc_refresher, while a change to stack_auth.oidc_refresher can't break stack_auth.
Position
Below the diagonal: stack_auth.oidc_refresher uses a module listed above it, which is the healthy direction.
stack_auth.oidc_refresher uses stack_auth.token, so a change to stack_auth.token can break stack_auth.oidc_refresher, while a change to stack_auth.oidc_refresher can't break stack_auth.token.
Position
Below the diagonal: stack_auth.oidc_refresher uses a module listed above it, which is the healthy direction.
stack_encrypt.dynamic.record uses stack_encrypt.descriptor, so a change to stack_encrypt.descriptor can break stack_encrypt.dynamic.record, while a change to stack_encrypt.dynamic.record can't break stack_encrypt.descriptor.
Position
Below the diagonal: stack_encrypt.dynamic.record uses a module listed above it, which is the healthy direction.
stack_encrypt.dynamic.record uses stack_encrypt.keyset, so a change to stack_encrypt.keyset can break stack_encrypt.dynamic.record, while a change to stack_encrypt.dynamic.record can't break stack_encrypt.keyset.
Position
Below the diagonal: stack_encrypt.dynamic.record uses a module listed above it, which is the healthy direction.
31→34 stack_encrypt.dynamic.record uses stack_encrypt.cipherpart of a loop✕
Connections
2 pairs of types, where a type in stack_encrypt.dynamic.record uses a type in stack_encrypt.cipher.
stack_encrypt.dynamic.record uses stack_encrypt.cipher, so a change to stack_encrypt.cipher can break stack_encrypt.dynamic.record, while a change to stack_encrypt.dynamic.record can't break stack_encrypt.cipher.
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.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption.client-v3 uses a type in languages.typescript.packages.protect-ffi.src.types.
languages.typescript.packages.stack.src.encryption.client-v3 uses languages.typescript.packages.protect-ffi.src.types, so a change to languages.typescript.packages.protect-ffi.src.types can break languages.typescript.packages.stack.src.encryption.client-v3, while a change to languages.typescript.packages.stack.src.encryption.client-v3 can't break languages.typescript.packages.protect-ffi.src.types.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.client-v3 uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption.client-v3 uses a type in languages.typescript.packages.stack.src.encryption.operations.decrypt.
languages.typescript.packages.stack.src.encryption.client-v3 uses languages.typescript.packages.stack.src.encryption.operations.decrypt, so a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can break languages.typescript.packages.stack.src.encryption.client-v3, while a change to languages.typescript.packages.stack.src.encryption.client-v3 can't break languages.typescript.packages.stack.src.encryption.operations.decrypt.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption.client-v3 uses a module listed above it, which is the healthy direction.
stack_auth.error uses stack_profile.diagnostic, so a change to stack_profile.diagnostic can break stack_auth.error, while a change to stack_auth.error can't break stack_profile.diagnostic.
Position
Below the diagonal: stack_auth.error uses a module listed above it, which is the healthy direction.
stack_auth.error uses stack_auth.auto_refresh, so a change to stack_auth.auto_refresh can break stack_auth.error, while a change to stack_auth.error can't break stack_auth.auto_refresh.
Position
Below the diagonal: stack_auth.error uses a module listed above it, which is the healthy direction.
stack_encrypt.cipher uses stack_profile.diagnostic, so a change to stack_profile.diagnostic can break stack_encrypt.cipher, while a change to stack_encrypt.cipher can't break stack_profile.diagnostic.
Position
Below the diagonal: stack_encrypt.cipher uses a module listed above it, which is the healthy direction.
stack_encrypt.cipher uses stack_encrypt.descriptor, so a change to stack_encrypt.descriptor can break stack_encrypt.cipher, while a change to stack_encrypt.cipher can't break stack_encrypt.descriptor.
Position
Below the diagonal: stack_encrypt.cipher uses a module listed above it, which is the healthy direction.
stack_encrypt.cipher uses stack_encrypt.keyset, so a change to stack_encrypt.keyset can break stack_encrypt.cipher, while a change to stack_encrypt.cipher can't break stack_encrypt.keyset.
Position
Below the diagonal: stack_encrypt.cipher uses a module listed above it, which is the healthy direction.
stack_encrypt.cipher uses stack_encrypt.dynamic.record, so a change to stack_encrypt.dynamic.record can break stack_encrypt.cipher, while a change to stack_encrypt.cipher can't break stack_encrypt.dynamic.record.
Position
Below the diagonal: stack_encrypt.cipher uses a module listed above it, which is the healthy direction.
eql_bindings.encryption.targets uses stack_encrypt.descriptor, so a change to stack_encrypt.descriptor can break eql_bindings.encryption.targets, while a change to eql_bindings.encryption.targets can't break stack_encrypt.descriptor.
Position
Below the diagonal: eql_bindings.encryption.targets uses a module listed above it, which is the healthy direction.
eql_bindings.encryption.targets uses stack_encrypt.keyset, so a change to stack_encrypt.keyset can break eql_bindings.encryption.targets, while a change to eql_bindings.encryption.targets can't break stack_encrypt.keyset.
Position
Below the diagonal: eql_bindings.encryption.targets uses a module listed above it, which is the healthy direction.
eql_bindings.encryption.targets uses stack_encrypt.cipher, so a change to stack_encrypt.cipher can break eql_bindings.encryption.targets, while a change to eql_bindings.encryption.targets can't break stack_encrypt.cipher.
Position
Below the diagonal: eql_bindings.encryption.targets uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack-supabase.src uses languages.typescript.packages.stack.src.eql.v3.table, so a change to languages.typescript.packages.stack.src.eql.v3.table can break languages.typescript.packages.stack-supabase.src, while a change to languages.typescript.packages.stack-supabase.src can't break languages.typescript.packages.stack.src.eql.v3.table.
Position
Below the diagonal: languages.typescript.packages.stack-supabase.src uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack-supabase.src uses languages.typescript.packages.stack.src.errors, so a change to languages.typescript.packages.stack.src.errors can break languages.typescript.packages.stack-supabase.src, while a change to languages.typescript.packages.stack-supabase.src can't break languages.typescript.packages.stack.src.errors.
Position
Below the diagonal: languages.typescript.packages.stack-supabase.src uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack-supabase.src uses languages.typescript.packages.stack.src.types, so a change to languages.typescript.packages.stack.src.types can break languages.typescript.packages.stack-supabase.src, while a change to languages.typescript.packages.stack-supabase.src can't break languages.typescript.packages.stack.src.types.
Position
Below the diagonal: languages.typescript.packages.stack-supabase.src uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack-supabase.src uses a type in languages.typescript.packages.stack.src.encryption.client-v3.
languages.typescript.packages.stack-supabase.src uses languages.typescript.packages.stack.src.encryption.client-v3, so a change to languages.typescript.packages.stack.src.encryption.client-v3 can break languages.typescript.packages.stack-supabase.src, while a change to languages.typescript.packages.stack-supabase.src can't break languages.typescript.packages.stack.src.encryption.client-v3.
Position
Below the diagonal: languages.typescript.packages.stack-supabase.src uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in languages.typescript.packages.stack.src.encryption uses a type in languages.typescript.packages.protect-ffi.src.types.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.protect-ffi.src.types, so a change to languages.typescript.packages.protect-ffi.src.types can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.protect-ffi.src.types.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption uses a type in languages.typescript.packages.stack.src.eql.v3.table.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.stack.src.eql.v3.table, so a change to languages.typescript.packages.stack.src.eql.v3.table can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.stack.src.eql.v3.table.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.stack.src.errors, so a change to languages.typescript.packages.stack.src.errors can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.stack.src.errors.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.stack.src.types, so a change to languages.typescript.packages.stack.src.types can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.stack.src.types.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption uses a type in languages.typescript.packages.stack.src.encryption.operations.decrypt.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.stack.src.encryption.operations.decrypt, so a change to languages.typescript.packages.stack.src.encryption.operations.decrypt can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.stack.src.encryption.operations.decrypt.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in languages.typescript.packages.stack.src.encryption uses a type in languages.typescript.packages.stack.src.encryption.client-v3.
languages.typescript.packages.stack.src.encryption uses languages.typescript.packages.stack.src.encryption.client-v3, so a change to languages.typescript.packages.stack.src.encryption.client-v3 can break languages.typescript.packages.stack.src.encryption, while a change to languages.typescript.packages.stack.src.encryption can't break languages.typescript.packages.stack.src.encryption.client-v3.
Position
Below the diagonal: languages.typescript.packages.stack.src.encryption uses a module listed above it, which is the healthy direction.
protect_ffi uses stack_encrypt.dynamic.value, so a change to stack_encrypt.dynamic.value can break protect_ffi, while a change to protect_ffi can't break stack_encrypt.dynamic.value.
Position
Below the diagonal: protect_ffi uses a module listed above it, which is the healthy direction.
protect_ffi uses stack_encrypt.dynamic.record, so a change to stack_encrypt.dynamic.record can break protect_ffi, while a change to protect_ffi can't break stack_encrypt.dynamic.record.
Position
Below the diagonal: protect_ffi uses a module listed above it, which is the healthy direction.
stack_auth.oidc_federation_strategy uses stack_auth, so a change to stack_auth can break stack_auth.oidc_federation_strategy, while a change to stack_auth.oidc_federation_strategy can't break stack_auth.
Position
Below the diagonal: stack_auth.oidc_federation_strategy uses a module listed above it, which is the healthy direction.
stack_auth.oidc_federation_strategy uses stack_auth.token, so a change to stack_auth.token can break stack_auth.oidc_federation_strategy, while a change to stack_auth.oidc_federation_strategy can't break stack_auth.token.
Position
Below the diagonal: stack_auth.oidc_federation_strategy uses a module listed above it, which is the healthy direction.
stack_auth.oidc_federation_strategy uses stack_auth.auto_refresh, so a change to stack_auth.auto_refresh can break stack_auth.oidc_federation_strategy, while a change to stack_auth.oidc_federation_strategy can't break stack_auth.auto_refresh.
Position
Below the diagonal: stack_auth.oidc_federation_strategy uses a module listed above it, which is the healthy direction.
stack_auth.oidc_federation_strategy uses stack_auth.oidc_refresher, so a change to stack_auth.oidc_refresher can break stack_auth.oidc_federation_strategy, while a change to stack_auth.oidc_federation_strategy can't break stack_auth.oidc_refresher.
Position
Below the diagonal: stack_auth.oidc_federation_strategy uses a module listed above it, which is the healthy direction.
stack_auth.oidc_federation_strategy uses stack_auth.error, so a change to stack_auth.error can break stack_auth.oidc_federation_strategy, while a change to stack_auth.oidc_federation_strategy can't break stack_auth.error.
Position
Below the diagonal: stack_auth.oidc_federation_strategy uses a module listed above it, which is the healthy direction.
stack_auth_node uses stack_auth.token, so a change to stack_auth.token can break stack_auth_node, while a change to stack_auth_node can't break stack_auth.token.
Position
Below the diagonal: stack_auth_node uses a module listed above it, which is the healthy direction.
stack_auth_node uses stack_auth.oidc_refresher, so a change to stack_auth.oidc_refresher can break stack_auth_node, while a change to stack_auth_node can't break stack_auth.oidc_refresher.
Position
Below the diagonal: stack_auth_node uses a module listed above it, which is the healthy direction.
stack_auth_node uses stack_auth.error, so a change to stack_auth.error can break stack_auth_node, while a change to stack_auth_node can't break stack_auth.error.
Position
Below the diagonal: stack_auth_node uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
133
High / Critical
A03:2025 — Software Supply Chain Failures
56
High / Critical
A02:2025 — Security Misconfiguration
7
High / Critical
Roadmap
Top priorities: Bring the 69 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with query-filters.applyFilters (cyclomatic 51), gensupport.convert (cyclomatic 47), xml-to-markdown.process_function (cyclomatic 46); Interpolated log message defeats structured logging; Swallowed exception (empty catch).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Bring the 69 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with query-filters.applyFilters (cyclomatic 51), gensupport.convert (cyclomatic 47), xml-to-markdown.process_function (cyclomatic 46).
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.
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.
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 — 123
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 — 974
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 — 173
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 9
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 81 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, 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 — 81 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, 1233 of 1270 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 5,499 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 227 test source file(s) (.rs, .go) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
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. `languages/golang/encrypt/gensupport/convert.go`, `languages/typescript/packages/auth/wasm-inline.d.ts`, `languages/typescript/packages/cli/src/commands/init/lib/parse-plan.ts`, `languages/typescript/packages/migrate/src/state.ts`, `languages/typescript/packages/stack-drizzle/src/column.ts`, … (+16 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.
AX6 Interface segregation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
DM9 Scattered domain decisions — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
PF3 Async & latency hygiene — 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
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. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
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. 87 further occurrence(s) are not listed individually; the score already reflects all 127.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
X5 Nullable reference types — 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. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
Repo exclusion declarations: 2 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D25 ADR Conformance: ADR conformance checks only decisions stated in a checkable form (a ruled-out element, package or dependency, an adr-rules block, a declared delivery status): a decision written only as prose is unverifiable, and decisions never written down are not checked.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
69 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was query-filters.applyFilters at 51. A further 9 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being guest.StatusError at 29 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: languages/golang/internal/guest/status.go (guest.StatusError at 29), languages/typescript/packages/protect-ffi/crates/protect-ffi/src/js_plaintext.rs (JsPlaintext::to_plaintext_with_type at 26), packages/stack-profile/src/error.rs (stack_profile::error::io_kind at 22), packages/stack-auth/src/error.rs (AuthError::kind at 21), packages/eql/crates/eql-codegen/src/operator_surface.rs (OpSymbol::as_str at 20), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 61 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 69 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with query-filters.applyFilters (cyclomatic 51), gensupport.convert (cyclomatic 47), xml-to-markdown.process_function (cyclomatic 46). — 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 69 together lifts Cyclomatic Complexity from 6.7 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
+ 93 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with interface.initializeAgent.run (cognitive 105), xml-to-markdown.process_function (cognitive 82), query-terms.collectQueryTerms (cognitive 67). — 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 5 together lifts Cognitive Complexity from 5.6 to about 6.3/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.9 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 21 FunctionTooLong finding(s) in God Classes — start with adapter.ts (4), interface.ts (2), backfill.ts (2). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 16 FileTooLong finding(s) in God Classes — start with lib.rs, cipher.rs, record.rs. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 1 TooManyMethods finding(s) in God Classes — start with query-builder.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
41 duplicated block group(s) detected. 1.4 % of the production lines (2,183 of 160,501) are in a reported copy. A further 49 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .ts (41% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
Edited copy of a member (8 corresponding lines) · ×7languages/golang/encrypt/cipher.go:61
+ 46 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Edited copy of a member (8 corresponding lines) finding(s) in Code Duplication — start with cipher.go, profile_store.rs, ops.rs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with abi.rs, generate.rs, targets.rs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 Edited copy of a member (10 corresponding lines) finding(s) in Code Duplication — start with device_client.rs, lib.rs, policy.go. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.3 / 10Stronggated by 4 serious findings✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
46 production modules (Cargo+npm+Go), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 25 of the 46 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: @cipherstash/eql · ×3
Unstable project @cipherstash/protect-ffi
What to do
Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Unstable project @cipherstash/protect-ffi finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.5 / 10Stronggated by 168 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
5 skipped (5 with a documented reason), 168 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 5499 tests. Measured on the JavaScript/TypeScript suite only — at least 227 test source file(s) (.rs, .go) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: rows carry each column its domain plaintext type · ×168languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:48
Mock-dominated test: caches the decrypted plaintext for subsequent calls · ×39languages/typescript/packages/stack-prisma/test/envelope-string.test.ts:106
Resolve the 168 No assertions finding(s) in Test Quality — start with typed-client-v3.test-d.ts (45), supabase-v3.test-d.ts (44), schema-extraction.test-d.ts (18). — One of this dimension's main actionable groups (168 warning-level).
Resolve the 39 Mock-dominated test finding(s) in Test Quality — start with decrypt-backfill.test.ts (11), decrypt-drop-plan.test.ts (10), encrypt-v3.test.ts (6). — One of this dimension's main actionable groups (39 recommendation-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability8.0 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
1 flaky across 2 measured tier(s). JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root (4567 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in e2e/ (108 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/examples/prisma/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/auth/ (39 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/bench/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/cli/ (1201 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/migrate/ (106 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/nextjs/ (119 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/profile/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/protect-ffi/ (107 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/protect-ffi/integration-tests/ (141 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in languages/typescript/packages/stack/ (921 tests)): measured (1 flaky); Rust (repository root, 208 test files): measured (0 flaky).
Flaky test: the repository rootscripts/__tests__/eql-suite-ci.test.mjs::the guard fails when a workflow stops calling a cargo check names every workflow whose deletion would orphan a cargo check
What to do
Resolve the 1 Flaky test finding(s) in Test Reliability. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d11_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.
2 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). 7 of 7 direct requirement(s) were graded against proxy.golang.org (0 not served there, 2 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org 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, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Outdated: golang.org/x/oauth2 · ×2
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 471 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: packages/stack-encrypt/src/dynamic/record.rs (37×21=777); languages/golang/encrypt/client.go (27×28=756); packages/stack-encrypt-derive/src/shape.rs (30×18=540) Repeated repair below the complexity floor: packages/stack-encrypt/src/keyset.rs (10 of 11 changes were fixes); packages/stack-auth/src/device_session_refresher.rs (9 of 13 changes were fixes); packages/stack-auth/src/auto_strategy.rs (9 of 13 changes were fixes)
Resolve the 38 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), keyset.rs, device_session_refresher.rs. — One of this dimension's main actionable groups (38 warning-level).
Resolve the 24 Hotspot finding(s) in Churn × Complexity Hotspots — start with status.ts (2), record.rs, client.go. — One of this dimension's main actionable groups (24 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 Factor6.1 / 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.
168 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/stack-encrypt/src/dynamic/record.rs. Counted over 429 of the 573 production source files in this repository: 137 are under the ~2,400-byte size floor this dimension measures over, and the remaining 7 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
6 deducted task-comment markers across 160501 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with token.rs, bulk-protect.test.ts, setup-prompt.test.ts. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with key.rs (2). — One of this dimension's main actionable groups (2 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. 93 document(s) read across 35 unit(s).
Documentation: no build, run or usage example · ×13languages/typescript/packages/auth/platforms/darwin-arm64/README.md:1
What to do
Resolve the 13 Documentation finding(s) in Documentation Quality — start with README.md (13). — One of this dimension's main actionable groups (13 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality8.5 / 10Strong✓ 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.
3 of 12 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR has no Context section · ×2languages/typescript/packages/migrate/docs/adr/0001-forced-pass-is-an-obligation.md:6detected by adr-integrity
ADR has no Context and Decision sectionpackages/stack-encrypt/docs/adr/0001-context-optional-cipher-directed-path.md:6detected by adr-integrity
What to do
Resolve the 2 ADR has no Context section finding(s) in ADR Quality — start with 0001-forced-pass-is-an-obligation.md, 0003-declarative-targets-and-ciphertext-transcoding.md. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 ADR has no Context and Decision section finding(s) in ADR Quality — start with 0001-context-optional-cipher-directed-path.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
2 naming inconsistencies among 29 declarations measured against a convention their peers follow.
`renderQuestLogJSON` spells `JSON` where 27 names in the project spell it `Json`languages/typescript/packages/cli/src/commands/status/render.ts:213
`toJSON` spells `JSON` where 27 names in the project spell it `Json`languages/typescript/packages/stack-prisma/src/execution/envelope-base.ts:225
What to do
Resolve the 1 `renderQuestLogJSON` spells `JSON` where 27 names in the project spell… finding(s) in Naming Consistency — start with render.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `toJSON` spells `JSON` where 27 names in the project spell it `Json` finding(s) in Naming Consistency — start with envelope-base.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D22 · Internal API Consistency9.2 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Whether the internal API surface is consistent and coherent.
Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.
1 API inconsistencies among 120 exposed members measured against a convention their peers follow.
`stashgen.ParseModelFlag` takes no context.Context; its 3 sibling operations take onelanguages/golang/stashgen/model.go:22
What to do
Resolve the 1 `stashgen.ParseModelFlag` takes no context.Context; its 3 sibling… finding(s) in Internal API Consistency — start with model.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.
Method: Each binding ADR read for checkable forms: a backticked element its Decision section rules out, a ruled-out package the manifests declare, a forbidden module dependency, an opt-in adr-rules block, and a declared delivery status the code does not yet carry. A prose decision with no checkable form is unverifiable, neither a finding nor a pass. Deterministic, no model. Advisory.
0 of 2 checkable records are broken by the code or by their own declared delivery (2 of 9 binding records state a rule in checkable form or declare their delivery; prose decisions are unverifiable).
4 of 28 build units (Cargo, Go, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×4languages/typescript/packages/cli/package.json:1
What to do
Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
137 finding(s): 0 critical, 113 high, 17 medium, 7 low. 78 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 38 file(s) — `languages/golang/encrypt/gensupport/convert.go` (line 300, line 326), `languages/golang/internal/guesttest/memlock_unix.go` (line 18), `languages/typescript/examples/prisma/src/db.ts` (line 20), `languages/typescript/packages/auth/wasm-inline.d.ts` (line 64), `languages/typescript/packages/cli/src/commands/init/lib/parse-plan.ts` (line 28), … (+33 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 23 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (23 issue-level).
Resolve the 5 REDACTED finding(s) charged to Static Analysis (SAST) — the other 77 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (82 issue-level, 5 of them charged here).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 17 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (17). — One of this dimension's main actionable groups (17 warning-level).
Resolve the 13 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (13). — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
7 of 436 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs. Counted over 436 of the 573 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with eql_v3.rs, js_plaintext.rs, client_options.rs. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 4 Orphaned file finding(s) in Knowledge Freshness — start with encrypt_config.rs, query_op.rs, terms.rs. — One of this dimension's main actionable groups (4 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with encrypt.rs, decrypt.rs. — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 11 platform declaration(s) and 0 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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`SupabaseQueryBuilder` declares 30 required operations: `select`, `insert`, `update`, `upsert`, `delete`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`, `contains`, `is`, `in`, `filter`, `not`, `or`, `match`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `throwOnError`, `returns`, `then`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — languages/typescript/packages/stack-supabase/src/types.ts:759
`EncryptedQueryBuilderCore` declares 30 required operations: `select`, `insert`, `update`, `upsert`, `delete`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `is`, `is`, `in`, `filter`, `not`, `or`, `or`, `match`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `throwOnError`, `returns`, `withLockContext`, `audit`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 30 declarations carry 28 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 28 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — languages/typescript/packages/stack-supabase/src/types.ts:847
`EncryptionClient` declares 16 required operations under just 11 distinct name(s): `encrypt`, `encryptQuery`, `encryptQuery`, `encryptModel`, `bulkEncryptModels`, `decrypt`, `decryptModel`, `decryptModel`, `decryptModel`, `bulkDecryptModels`, `bulkDecryptModels`, `bulkDecryptModels`, `bulkEncrypt`, `bulkDecrypt`, `getEncryptConfig`, `getSchemas`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — languages/typescript/packages/stack/src/encryption/client-v3.ts:176
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.
Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
languages.typescript.packages.cli.src.commands.status.quest.QuestLog's [active, completed] are judged in languages.typescript.packages.cli.src.commands.index, languages.typescript.packages.cli.src.commands.status.render — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
languages.typescript.packages.stack-prisma.src.execution.envelope-base.EncryptedEnvelopeHandle's [column, table] are judged in languages.typescript.packages.stack-prisma.src.execution.decrypt-all, languages.typescript.packages.stack-prisma.src.execution.envelope-base.EncryptedEnvelopeBase, languages.typescript.packages.stack-prisma.src.execution.routing, languages.typescript.packages.stack-prisma.src.v3.bulk-encrypt-v3 — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
What to do
Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
Other · Code Health — Unreviewed-generation residue in this repository's Rust: functions whose whole body is still `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings 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 Rust: functions whose body is `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, match arms and branches left as `todo!()`, functions that take inputs and return a constant (`Ok(())`, `None`, `Default::default()`, an empty `Vec`) or do nothing, and impls 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.
`warn_callback` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — languages/typescript/packages/auth/src/lib.rs:38
`methods` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — packages/eql/crates/eql-codegen/src/go_eql.rs:84
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
`packages/eql/docs/reference/catalog-driven-architecture.md` draws the system's parts, and the drawing no longer matches the code: it names `eql_v3`, `eql_v3_integer`, which no project, package or service of the repository is. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape. — packages/eql/docs/reference/catalog-driven-architecture.md:252
What to do
Update packages/eql/docs/reference/catalog-driven-architecture.md so it draws the parts the code has today: remove or rename eql_v3, eql_v3_integer.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.1 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 9/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `languages/typescript/packages/protect-ffi/crates/protect-ffi`, `packages/eql/crates/eql-bindings`, `packages/eql/crates/eql-codegen`.
`languages/typescript/packages/stack/src/wasm-inline.ts` reports through `console.*` at line 1915 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/stack/src/wasm-inline.ts:1915
`languages/typescript/packages/stack/src/schema/internal.ts` reports through `console.*` at line 748 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/stack/src/schema/internal.ts:748
`languages/typescript/packages/stack/src/encryption/client-v3.ts` reports through `console.*` at line 362 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/stack/src/encryption/client-v3.ts:362
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 487 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:487
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 488 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:488
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 489 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:489
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 520 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:520
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 521 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:521
`languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — languages/typescript/packages/wizard/src/agent/interface.ts:522
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Add a health-check endpoint (a /health route on your axum/actix router) 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.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
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.
`existsSync` in `offerStashConfig` 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. — languages/typescript/packages/cli/src/commands/db/config-scaffold.ts:122
`existsSync` in `findGeneratedMigration` 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. — languages/typescript/packages/cli/src/commands/db/drizzle-migration.ts:21
`fs.existsSync` in `loadEncryptionContext` 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. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:52
`fs.existsSync` in `callback to find` 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. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:207
`fs.readFileSync` in `Encryption` 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. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:249
`spawnSync` in `scaffoldDrizzleMigration` 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. — languages/typescript/packages/cli/src/commands/encrypt/drizzle-helper.ts:53
`existsSync` in `listSqlFiles` 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. — languages/typescript/packages/cli/src/commands/encrypt/drizzle-helper.ts:103
`fs.mkdirSync` in `writeMigrationFile` 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. — languages/typescript/packages/cli/src/commands/encrypt/lib/migration-file.ts:69
`fs.writeFileSync` in `writeMigrationFile` 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. — languages/typescript/packages/cli/src/commands/encrypt/lib/migration-file.ts:76
`existsSync` in `resolveWriteTarget` 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. — languages/typescript/packages/cli/src/commands/env/index.ts:237
`spawnSync` in `generateDrizzleEqlMigration` 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. — languages/typescript/packages/cli/src/commands/eql/migration.ts:470
`writeFileSync` in `generateDrizzleEqlMigration` 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. — languages/typescript/packages/cli/src/commands/eql/migration.ts:552
`existsSync` in `eqlRepairCommand` 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. — languages/typescript/packages/cli/src/commands/eql/repair.ts:80
`existsSync` in `implCommand` 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. — languages/typescript/packages/cli/src/commands/impl/index.ts:173
`readFileSync` in `implCommand` 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. — languages/typescript/packages/cli/src/commands/impl/index.ts:187
`existsSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:101, languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:132
`mkdirSync` in `run` 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. — languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:132
`writeFileSync` in `run` 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. — languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:133
`execSync` in `run` 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. — languages/typescript/packages/cli/src/commands/init/steps/install-deps.ts:350
`existsSync` in `builderCommand` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — languages/typescript/packages/cli/src/commands/schema/build.ts:39, languages/typescript/packages/cli/src/commands/schema/build.ts:68
`mkdirSync` in `builderCommand` 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. — languages/typescript/packages/cli/src/commands/schema/build.ts:69
`writeFileSync` in `builderCommand` 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. — languages/typescript/packages/cli/src/commands/schema/build.ts:72
`fs.existsSync` in `loadEncryptionClient` 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. — languages/typescript/packages/cli/src/config/index.ts:212
`existsSync` in `flush` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — languages/typescript/packages/wizard/src/lib/changelog.ts:43, languages/typescript/packages/wizard/src/lib/changelog.ts:46
`mkdirSync` in `flush` 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. — languages/typescript/packages/wizard/src/lib/changelog.ts:43
`existsSync` in `readExisting` 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. — languages/typescript/packages/wizard/src/lib/changelog.ts:62
`existsSync` in `gatherContext` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — languages/typescript/packages/wizard/src/lib/gather.ts:80, languages/typescript/packages/wizard/src/lib/gather.ts:81, languages/typescript/packages/wizard/src/lib/gather.ts:113
`existsSync` in `tryIntrospect` 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. — languages/typescript/packages/wizard/src/lib/gather.ts:148
`readFileSync` in `tryIntrospect` 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. — languages/typescript/packages/wizard/src/lib/gather.ts:150
`existsSync` in `callback to skills.filter` 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. — languages/typescript/packages/wizard/src/lib/install-skills.ts:91
`mkdirSync` in `maybeInstallSkills` 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. — languages/typescript/packages/wizard/src/lib/install-skills.ts:103
`cpSync` in `maybeInstallSkills` 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. — languages/typescript/packages/wizard/src/lib/install-skills.ts:122
`execSync` in `runStep` 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. — languages/typescript/packages/wizard/src/lib/post-agent.ts:246
`existsSync` in `sweepMigrationDirs` 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. — languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1303
`mkdirSync` in `copyAssets` 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/eql/packages/eql/scripts/copy-assets.mjs:12
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 Safety8.7 / 10Strong✓ 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.
packages/eql/crates/eql-bindings/bindings/v3/ and packages/eql/packages/eql/src/generated/v3/ are near-verbatim copies of each other: 104 files are byte-identical under the same relative paths (~1231 lines; the trees hold 104 and 105 files). That is one structural fact, not 104 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — packages/eql/crates/eql-bindings/bindings/v3/SteVecDocument.ts:1
17 duplicated blocks under languages/typescript/packages/ have copies in at least two of the sibling directories cli, nextjs, protect-ffi, stack, stack-drizzle, stack-prisma (+3 more sibling(s) not listed) — 9 of them are reported below, and 8 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 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 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 17 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. — languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1
7 duplicated blocks under languages/typescript/packages/cli/src/commands/ have copies in at least two of the sibling directories db, decrypt, encrypt, eql, impl, init (+1 more sibling(s) not listed) — 6 of them are reported below, and 1 is 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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. — languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122
languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1 · languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:2 — these 2 files are line-for-line copies of one another — 355 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1
languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt.ts:40 · languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:65 — the two spans are one implementation copied and then locally edited — 695 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. — languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt.ts:40
languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122 · languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:118 — the two spans are one implementation copied and then locally edited — 562 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. — languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122
languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt-models.ts:27 · languages/typescript/packages/stack/src/encryption/operations/encrypt-model.ts:27 — the two spans are one implementation copied and then locally edited — 404 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. — languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt-models.ts:27
languages/typescript/packages/cli/src/commands/decrypt/drop.ts:77 · languages/typescript/packages/cli/src/commands/encrypt/drop.ts:58 — the two spans are one implementation copied and then locally edited — 330 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. — languages/typescript/packages/cli/src/commands/decrypt/drop.ts:77
languages/typescript/packages/cli/src/commands/status/render.ts:28 · languages/typescript/packages/cli/src/commands/status/render.ts:131 — the two spans are one implementation copied and then locally edited — 295 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. — languages/typescript/packages/cli/src/commands/status/render.ts:28
languages/typescript/packages/stack/src/utils/config/index.ts:11 · languages/typescript/packages/utils/config/index.ts:11 — the two spans are one implementation copied and then locally edited — 307 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. — languages/typescript/packages/stack/src/utils/config/index.ts:11
languages/typescript/packages/cli/src/commands/impl/steps/handoff-claude.ts:21 · languages/typescript/packages/cli/src/commands/impl/steps/handoff-codex.ts:46 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — languages/typescript/packages/cli/src/commands/impl/steps/handoff-claude.ts:21
languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:47 · languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:133 — 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. — languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:47
languages/typescript/packages/cli/src/commands/impl/index.ts:30 · languages/typescript/packages/cli/src/commands/plan/index.ts:57 — the two spans are one implementation copied and then locally edited — 296 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. — languages/typescript/packages/cli/src/commands/impl/index.ts:30
languages/typescript/packages/nextjs/src/cts/index.ts:17 · languages/typescript/packages/stack/src/identity/index.ts:11 — the two spans are one implementation copied and then locally edited — 298 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. — languages/typescript/packages/nextjs/src/cts/index.ts:17
languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:17 · languages/typescript/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts:21 · languages/typescript/packages/stack-prisma/migrations/20260814T0000_upgrade_eql_v3_3_0_5/migration.ts:27 — the 3 copies are spread across 3 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. — languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:17
languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:28 · languages/typescript/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts:32 — 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. — languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:28
languages/typescript/packages/stack-prisma/migrations/20261002T0000_upgrade_eql_v3_3_0_6/migration.ts:45 · languages/typescript/packages/stack-prisma/migrations/20261005T0000_upgrade_eql_v3_3_1_0/migration.ts:40 — the two spans are one implementation copied and then locally edited — 154 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. — languages/typescript/packages/stack-prisma/migrations/20261002T0000_upgrade_eql_v3_3_0_6/migration.ts:45
languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:80 · languages/typescript/packages/stack/src/encryption/operations/encrypt-model.ts:93 — 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. — languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:80
languages/typescript/packages/cli/src/commands/db/detect.ts:92 · languages/typescript/packages/cli/src/commands/db/detect.ts:132 — 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. — languages/typescript/packages/cli/src/commands/db/detect.ts:92
languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:142 · languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:208 — the two spans are one implementation copied and then locally edited — 203 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. — languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:142
languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:86 · languages/typescript/packages/wizard/src/tools/wizard-tools.ts:179 — 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. — languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:86
languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:40 · languages/typescript/packages/stack/src/encryption/operations/decrypt-model.ts:39 — 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. — languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:40
languages/typescript/packages/stack/src/eql/v3/table.ts:118 · languages/typescript/packages/stack/src/schema/internal.ts:649 — the two spans are one implementation copied and then locally edited — 117 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. — languages/typescript/packages/stack/src/eql/v3/table.ts:118
languages/typescript/packages/stack/src/dynamodb/helpers.ts:108 · languages/typescript/packages/stack/src/dynamodb/helpers.ts:178 — 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. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:108
languages/typescript/packages/stack/src/dynamodb/helpers.ts:413 · languages/typescript/packages/stack/src/dynamodb/helpers.ts:609 — 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. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:413
languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:404 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:461 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:522 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:586 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:404
languages/typescript/packages/stack-drizzle/integration/adapter.ts:124 · languages/typescript/packages/stack/integration/wasm/adapter.ts:371 — the two spans are one implementation copied and then locally edited — 150 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. — languages/typescript/packages/stack-drizzle/integration/adapter.ts:124
languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:174 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:228 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:286 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:346 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:174
languages/typescript/packages/stack/src/dynamodb/operations/base-operation.ts:32 · languages/typescript/packages/stack/src/encryption/operations/base-operation.ts:20 — 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. — languages/typescript/packages/stack/src/dynamodb/operations/base-operation.ts:32
languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:72 · languages/typescript/packages/stack-prisma/src/execution/envelope-json.ts:32 · languages/typescript/packages/stack-prisma/src/execution/envelope-string.ts:40 · languages/typescript/packages/stack-prisma/src/v3/envelope-number.ts:32 — the 4 copies are spread across 4 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. — languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:72
languages/typescript/packages/stack-supabase/src/query-encrypt.ts:350 · languages/typescript/packages/stack-supabase/src/query-encrypt.ts:396 — the two spans are one implementation copied and then locally edited — 79 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. — languages/typescript/packages/stack-supabase/src/query-encrypt.ts:350
languages/typescript/packages/cli/src/commands/encrypt/context.ts:50 · languages/typescript/packages/cli/src/config/index.ts:210 — the two spans are one implementation copied and then locally edited — 108 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. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:50
languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:80 · languages/typescript/packages/stack-prisma/src/execution/envelope-date.ts:85 · languages/typescript/packages/stack-prisma/src/execution/envelope-json.ts:35 · languages/typescript/packages/stack-prisma/src/execution/envelope-string.ts:48 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is inside a TYPE DECLARATION, not executable code. There is no function to extract and no call site to call one from, so do not read this as an extract-a-helper row: the collapse a type offers is a generic — name the shape once, parameterised over the part that varies, and have each copy instantiate it. First check what actually differs between the copies: where they are a MATRIX of cases (one entry per input, differing precisely in the case each one pins), the repetition IS the enumeration and collapsing it would delete cases rather than de-duplicate anything — leave those alone. Reported because the copies that are not a matrix drift apart the first time only one of them is edited. — languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:80
languages/typescript/packages/cli/src/commands/decrypt/status.ts:87 · languages/typescript/packages/cli/src/commands/encrypt/status.ts:124 — 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. — languages/typescript/packages/cli/src/commands/decrypt/status.ts:87
languages/typescript/packages/cli/src/commands/init/lib/install-skills.ts:194 · languages/typescript/packages/wizard/src/lib/install-skills.ts:112 — 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. — languages/typescript/packages/cli/src/commands/init/lib/install-skills.ts:194
languages/typescript/packages/migrate/src/cursor.ts:204 · languages/typescript/packages/migrate/src/cursor.ts:233 — 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. — languages/typescript/packages/migrate/src/cursor.ts:204
languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:183 · languages/typescript/packages/stack/src/encryption/operations/encrypt.ts:155 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:183
languages/typescript/packages/stack-drizzle/src/operators.ts:570 · languages/typescript/packages/stack-drizzle/src/operators.ts:774 — 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. — languages/typescript/packages/stack-drizzle/src/operators.ts:570
languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:268 · languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:304 — the two spans are one implementation copied and then locally edited — 118 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. — languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:268
languages/typescript/packages/stack/src/encryption/index.ts:911 · languages/typescript/packages/stack/src/wasm-inline.ts:1659 — 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. — languages/typescript/packages/stack/src/encryption/index.ts:911
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.
e2e/tests/package-managers.e2e.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/base.js) — 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. — e2e/tests/package-managers.e2e.test.ts:8
e2e/tests/package-managers.e2e.test.ts:9 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/drizzle.js) — 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. — e2e/tests/package-managers.e2e.test.ts:9
e2e/tests/package-managers.e2e.test.ts:10 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/supabase.js) — 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. — e2e/tests/package-managers.e2e.test.ts:10
e2e/tests/skill-map-parity.e2e.test.ts:23 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/lib/install-skills.js) — 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. — e2e/tests/skill-map-parity.e2e.test.ts:23
languages/typescript/packages/cli/src/commands/encrypt/context.ts:123 imports @cipherstash/stack-drizzle, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:123
languages/typescript/packages/stack-drizzle/integration/adapter.ts:6 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-drizzle/integration/adapter.ts:6
languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:6 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:6
languages/typescript/packages/stack-prisma/integration/adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/adapter.ts:2
languages/typescript/packages/stack-prisma/integration/adapter.ts:24 imports languages/typescript/packages/stack-prisma/test/live/helpers/harness.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/adapter.ts:24
languages/typescript/packages/stack-prisma/integration/adapter.ts:35 imports languages/typescript/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/adapter.ts:35
languages/typescript/packages/stack-prisma/integration/json-adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/json-adapter.ts:2
languages/typescript/packages/stack-prisma/integration/json-adapter.ts:20 imports languages/typescript/packages/stack-prisma/test/live/helpers/harness.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/json-adapter.ts:20
languages/typescript/packages/stack-prisma/integration/json-adapter.ts:31 imports languages/typescript/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-prisma/integration/json-adapter.ts:31
languages/typescript/packages/stack-supabase/integration/adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack-supabase/integration/adapter.ts:2
languages/typescript/packages/stack/integration/wasm/adapter.ts:29 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — languages/typescript/packages/stack/integration/wasm/adapter.ts:29
languages/typescript/packages/stack/integration/wasm/adapter.ts:29 imports @cipherstash/test-kit, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — languages/typescript/packages/stack/integration/wasm/adapter.ts:29
scripts/__tests__/cli-live-postgres-ci.test.mjs:68 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/vitest.config.ts?cli-live-ci-contract) — 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/__tests__/cli-live-postgres-ci.test.mjs:68
scripts/__tests__/cli-vitest-alias.test.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/vitest.config.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/__tests__/cli-vitest-alias.test.mjs:3
scripts/__tests__/sync-skill-pins.test.mjs:14 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/release-train.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/__tests__/sync-skill-pins.test.mjs:14
scripts/__tests__/wasm-core-contract-ci.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack/vitest.config.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/__tests__/wasm-core-contract-ci.test.mjs:4
scripts/__tests__/wasm-core-contract-ci.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack/vitest.wasm-core.config.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/__tests__/wasm-core-contract-ci.test.mjs:5
scripts/__tests__/wasm-core-contract-ci.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack-supabase/vitest.config.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/__tests__/wasm-core-contract-ci.test.mjs:8
What to do
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (10 rows); move the shared test helper into a source directory production code may depend on (10 rows); declare the workspace packages these files import in the importing package's own REDACTED dependencies (2 rows) — those imports are already bare package specifiers, so the import statements do not change, only the manifest.
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.
applyFilters has cyclomatic complexity 48 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. — languages/typescript/packages/stack-supabase/src/query-filters.ts:136
run has cyclomatic complexity 47 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/wizard/src/agent/interface.ts:299
construct has cyclomatic complexity 36 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/stack-supabase/src/create.ts:218
generateDrizzleEqlMigration has cyclomatic complexity 34 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/cli/src/commands/eql/migration.ts:386
decryptBackfillCommand has cyclomatic complexity 34 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. — languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111
initCommand has cyclomatic complexity 33 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/cli/src/commands/init/index.ts:114
collectQueryTerms has cyclomatic complexity 32 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/stack-supabase/src/query-terms.ts:112
inspectReinstallDependencies has cyclomatic complexity 32 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 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. — languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:494
validateSchemas has cyclomatic complexity 31 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:242
(anonymous) has cyclomatic complexity 31 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — e2e/migration-guide/postgres.ts:171
run has cyclomatic complexity 30 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/cli/src/commands/init/steps/install-deps.ts:193
assessEqlInstallation has cyclomatic complexity 27 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. — languages/typescript/packages/cli/src/installer/installation-state.ts:78
statusCommand has cyclomatic complexity 26 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. — languages/typescript/packages/cli/src/commands/db/status.ts:8
implCommand has cyclomatic complexity 25 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/cli/src/commands/impl/index.ts:146
run has cyclomatic complexity 25 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/wizard/src/run.ts:40
diffSurface has cyclomatic complexity 25 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. — languages/typescript/packages/cli/src/installer/verify.ts:719
installCommand has cyclomatic complexity 25 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/cli/src/commands/db/install.ts:101
backfillCommand 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. — languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:113
wizardCanUseTool has cyclomatic complexity 24 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/wizard/src/agent/interface.ts:146
splitTopLevel has cyclomatic complexity 24 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/stack-supabase/src/helpers.ts:402
loadEncryptionContext has cyclomatic complexity 23 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. — languages/typescript/packages/cli/src/commands/encrypt/context.ts:48
compareVersions has cyclomatic complexity 23 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 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. — languages/typescript/packages/cli/src/runtime-versions.ts:121
decryptPlanCommand has cyclomatic complexity 22 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81
renderPreflightReport has cyclomatic complexity 22 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/cli/src/commands/db/preflight.ts:106
coerceV3 has cyclomatic complexity 21 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 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. — languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:303
renderRow has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/cli/src/commands/encrypt/status.ts:143
generateSupabaseEqlMigration has cyclomatic complexity 20 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 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. — languages/typescript/packages/cli/src/commands/eql/migration.ts:242
run has cyclomatic complexity 20 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 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. — languages/typescript/packages/cli/src/commands/init/steps/install-eql.ts:212
planCommand has cyclomatic complexity 20 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 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. — languages/typescript/packages/cli/src/commands/plan/index.ts:197
run has cyclomatic complexity 20 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/stack/integration/wasm/adapter.ts:280
isInsideCommentOrString has cyclomatic complexity 19 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. (×2) — languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:189, languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:197
processValue has cyclomatic complexity 19 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:518
goReleaseVersionErrors has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/go-release-version.mjs:64
restorationEvent has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — languages/typescript/packages/cli/src/installer/__tests__/restoration-scenarios.ts:193
eqlLockstepSkew has cyclomatic complexity 18 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. — scripts/sync-lockstep-versions.mjs:366
renderOverview has cyclomatic complexity 18 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. — languages/typescript/packages/cli/src/commands/decrypt/plan.ts:347
deriveColumnMigration has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/migrate/src/column-migration.ts:162
run has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — languages/typescript/packages/cli/src/commands/impl/steps/handoff-codex.ts:49
resolveDatabaseUrl has cyclomatic complexity 17 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — languages/typescript/packages/cli/src/config/database-url.ts:206
Do you agree with this assessment?
R3 · Large Files6.1 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
languages/typescript/packages/stack/src/wasm-inline.ts has 1899 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/wasm-inline.ts:1
languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts has 1306 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1
languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts has 1187 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1
languages/typescript/packages/cli/src/installer/verify.ts has 996 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/installer/verify.ts:1
languages/typescript/packages/stack-supabase/src/types.ts has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-supabase/src/types.ts:1
languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts has 974 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:1
languages/typescript/packages/stack/src/encryption/index.ts has 946 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/encryption/index.ts:1
languages/typescript/packages/stack-drizzle/src/operators.ts has 916 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-drizzle/src/operators.ts:1
REDACTED has 848 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
languages/typescript/packages/stack-supabase/src/query-builder.ts has 832 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-supabase/src/query-builder.ts:1
languages/typescript/packages/stack/src/eql/v3/columns.ts has 776 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/eql/v3/columns.ts:1
languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts has 775 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts:1
languages/typescript/packages/migrate/src/column-migration.ts has 741 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/migrate/src/column-migration.ts:1
languages/typescript/packages/stack/src/schema/internal.ts has 710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/schema/internal.ts:1
languages/typescript/packages/test-kit/src/catalog.ts has 689 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/test-kit/src/catalog.ts:1
languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:1
languages/typescript/packages/stack/src/encryption/client-v3.ts has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/encryption/client-v3.ts:1
languages/typescript/packages/stack-supabase/src/helpers.ts has 614 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-supabase/src/helpers.ts:1
languages/typescript/packages/migrate/src/decrypt.ts has 608 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/migrate/src/decrypt.ts:1
languages/typescript/packages/stack/src/dynamodb/helpers.ts has 595 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:1
languages/typescript/packages/cli/src/commands/eql/migration.ts has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/eql/migration.ts:1
languages/typescript/packages/cli/src/commands/encrypt/backfill.ts has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:1
languages/typescript/packages/cli/src/commands/env/index.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. — languages/typescript/packages/cli/src/commands/env/index.ts:1
languages/typescript/packages/wizard/src/agent/interface.ts has 537 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/wizard/src/agent/interface.ts:1
languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts has 527 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:1
languages/typescript/packages/cli/src/messages.ts has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/messages.ts:1
languages/typescript/packages/stack/src/types.ts has 513 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/src/types.ts:1
languages/typescript/packages/cli/src/commands/init/utils.ts has 482 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/init/utils.ts:1
languages/typescript/packages/protect-ffi/src/types.ts has 481 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/protect-ffi/src/types.ts:1
languages/typescript/packages/stack-supabase/src/create.ts has 475 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-supabase/src/create.ts:1
languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts has 460 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts:1
languages/typescript/packages/migrate/src/backfill.ts has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/migrate/src/backfill.ts:1
languages/typescript/packages/cli/src/commands/decrypt/backfill.ts has 442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:1
languages/typescript/packages/stack/integration/wasm/adapter.ts has 437 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — languages/typescript/packages/stack/integration/wasm/adapter.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.1 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×26) — languages/typescript/packages/wizard/src/lib/gather.ts:1, languages/typescript/packages/wizard/src/run.ts:1, languages/typescript/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.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 REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
`scripts/__tests__/fixtures/lint-typecheck-scope/no-gate` is TypeScript, but a type error in it cannot fail anything this repository runs: its `build` script (`tsup`) compiles TypeScript with a transpile-only tool that strips types without checking them, and no script, config or CI step of the package runs `tsc --noEmit` or another type checker over it. Add a type check that can fail — a `typecheck` script running `tsc --noEmit` (or `vue-tsc`/`svelte-check`) that CI or the workspace pipeline runs, or a build step that checks before it bundles. — scripts/__tests__/fixtures/lint-typecheck-scope/no-gate/package.json:3
Do you agree with this assessment?
R7 · Dead Code8.8 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
24 file(s) (~4042 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: languages/typescript/packages/auth/wasm-inline.mjs imports './wasm/stack_auth_wasm_inline.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. — languages/typescript/packages/auth
Unreachable from the 299 application, 55 tooling and 572 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 (299 application, 55 tooling, 572 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 (×7) — languages/typescript/packages/wizard/src/run.ts, languages/typescript/packages/cli/src/commands/doctor/index.ts, languages/typescript/packages/utils/config/index.ts, …
no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/wizard/src/run.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×4) — languages/typescript/packages/wizard/src/lib/analytics.ts, REDACTED, languages/typescript/packages/wizard/src/agent/fetch-prompt.ts, …
no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/cli/src/commands/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) — languages/typescript/packages/cli/src/commands/telemetry/index.ts, languages/typescript/packages/cli/src/commands/db/test-connection.ts, languages/typescript/packages/cli/src/commands/manifest/index.ts
Nothing ultimately consumes this binding: its only referrer is the re-export in languages/typescript/packages/cli/src/commands/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 languages/typescript/packages/cli/src/commands/index.ts in the same commit, or the barrel will import a name that no longer exists. (×3) — languages/typescript/packages/cli/src/commands/db/preflight.ts:31, languages/typescript/packages/cli/src/commands/status/index.ts:188, languages/typescript/packages/cli/src/commands/wizard/index.ts:78
Nothing imports this binding — it is safe to review for removal. (×12) — languages/typescript/packages/cli/src/commands/eql/verify.ts:27, languages/typescript/packages/cli/src/commands/status/index.ts:65, languages/typescript/packages/cli/src/installer/index.ts:42, …
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. (×2) — languages/typescript/packages/stack/__tests__/bulk-protect.test.ts:14, languages/typescript/packages/wizard/src/agent/interface.ts:107
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.
Declared in languages/typescript/packages/cli/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. — languages/typescript/packages/cli/package.json:56
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — REDACTED:209, REDACTED:216, REDACTED:219
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
languages/typescript/packages/stack/src/encryption/index.ts → languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts → languages/typescript/packages/stack/src/encryption/index.ts (one verified cycle inside a mutually-dependent group of 11 files) — languages/typescript/packages/stack/src/encryption/index.ts:42
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
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.2 / 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.
`payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 759 with a piece of the document (and at line 760, line 761, line 762) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-kms/src/errors.rs:759
`encode` is public, takes a document from its caller (line 190) and hands it to `json_value`, which calls itself at line 302 with a piece of the document (and at line 307) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `json_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-guest-abi/src/last_error.rs:302
`payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 310 with a piece of the document (and at line 311, line 312) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-encrypt/src/cipher.rs:310
`key_count` is public and takes a `PendingStackCipherText` as its receiver from its caller, and it calls itself at line 1330 with a piece of the document (and at line 1332) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `key_count` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-encrypt/src/cipher.rs:1330
`seal_with` is public and takes a `PendingStackCipherText` as its receiver from its caller, and it calls itself at line 1429 with a piece of the document (and at line 1436) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `seal_with` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-encrypt/src/cipher.rs:1429
`payload` is public and takes a `TermError` as its receiver from its caller, and it calls itself at line 213 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-encrypt/src/sem/mod.rs:213
`payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 393 with a piece of the document (and at line 394) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/stack-encrypt/src/dynamic/mod.rs:393
`get_token` is public and takes a `AccessKeyStrategy` as its receiver from its caller, and it calls itself at line 329 with a piece of the document (and at line 259, line 261, line 349, line 350, line 468) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/stack-auth-wasm/src/lib.rs:329
`get_token_for_jwt` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 481 with a piece of the document (and at line 356, line 357) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token_for_jwt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/stack-auth-wasm/src/lib.rs:481
`toEncryptedDynamoItem` is exported, takes a document from its caller (line 357) and hands it to `processValue`, which calls itself at line 430 (`processValue`) with a piece of `attrValue` — and nowhere in `processValue` 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 `processValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:430
`toEncryptedDynamoItem` is exported, takes a document from its caller (line 357) and hands it to `processValue`, which calls itself at line 621 (`processValue`) with a piece of `attrValue` — and nowhere in `processValue` 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 `processValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/stack/src/dynamodb/helpers.ts:621
`dir` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 57 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `dir` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:57
`set_current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 64 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_current_workspace` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:64
`current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 73 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `current_workspace` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:73
`clear_current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 79 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `clear_current_workspace` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:79
`list_workspaces` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 85 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `list_workspaces` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:85
`workspace_store` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 93 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `workspace_store` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:93
`current_workspace_store` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `current_workspace_store` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/profile/src/lib.rs:105
`nonEmptyString` is exported and takes `value: unknown` from its caller, and it calls itself at line 59 (`nonEmptyString`) with a piece of `value` (and at line 77) — and nowhere in `nonEmptyString` 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 `nonEmptyString` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/nextjs/src/session.ts:59
`get_token` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 446 with a piece of the document (and at line 447) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/auth/src/lib.rs:446
`get_token_for_jwt` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 463 with a piece of the document (and at line 464) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token_for_jwt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — languages/typescript/packages/auth/src/lib.rs:463
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`Box::into_raw(boxed)` (line 83) gives up ownership in exchange for a raw handle — the value's `Drop` will no longer run — and nothing in the crate's code ever reclaims a `Box` from a raw pointer (`Box::from_raw`). The memory or descriptor stays allocated until the process ends, once per call. Pair the hand-out with its reclaim (a `free` function that rebuilds the owner with `from_raw` and drops it), or keep the owning value. — packages/stack-guest-abi/src/buffers.rs:83
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 5/8 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`reloadSchemaCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — languages/typescript/packages/stack-supabase/integration/helpers/pgrest.ts:49
`identify` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — languages/typescript/packages/stack/src/identity/index.ts:254
`fetchCtsToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — languages/typescript/packages/nextjs/src/cts/index.ts:182
What to do
Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
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. (×18) — languages/typescript/packages/wizard/src/lib/analytics.ts:171, languages/typescript/packages/wizard/src/lib/gather.ts:390, languages/typescript/packages/wizard/src/lib/gather.ts:421, …
`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. (×5) — REDACTED:64, languages/typescript/packages/stack-prisma/integration/adapter.ts:305, languages/typescript/packages/stack-drizzle/integration/adapter.ts:217, …
`.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. (×17) — languages/typescript/packages/stack-supabase/src/introspect.ts:239, languages/typescript/packages/migrate/src/engine.ts:256, languages/typescript/packages/cli/src/telemetry/index.ts:323, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`trace!` at line 181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:181
`trace!` at line 195 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:195
`trace!` at line 210 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:210
`trace!` at line 213 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:213
`trace!` at line 363 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:363
`debug!` at line 538 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-kms/src/client.rs:538
`warn!` at line 257 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-auth/src/device_session_strategy.rs:257
`warn!` at line 305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — packages/stack-auth/src/device_session_strategy.rs:305
Other · Code Health — Whether Rust's absent values are handled rather than forced — `Option` and `Result` make absence a value the caller must handle in every crate, and each `.unwrap()` or `.expect()` that no guard on its path proves present is a panic the first time the value is `None` or `Err`.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
`dirs::home_dir()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `default` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-profile/src/profile_store.rs:574
`` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `generate_one` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-kms/src/key_source.rs:443
`store.init_workspace(PINNED)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/cipher.rs:2106
`store.init_workspace(CURRENT)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/cipher.rs:2107
`stack_kms::SecretKey::from_hex(Uuid::new_v4().to_string(),"00".repeat(32))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/cipher.rs:2109
`store.current_workspace_store()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/cipher.rs:2112
`store.current_workspace_store().unwrap().save_profile(&key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/cipher.rs:2114
`NonEmpty::new(label)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `from` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/stack-encrypt/src/descriptor.rs:597
`env.add_template("types.sql",include_str!("../templates/types.sql.j2"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:18
`env.add_template("query_types.sql",include_str!("../templates/query_types.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:23
`env.add_template("functions.sql",include_str!("../templates/functions.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:28
`env.add_template("functions/extractor.sql.j2",include_str!("../templates/functions/extractor.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:36
`env.add_template("functions/wrapper.sql.j2",include_str!("../templates/functions/wrapper.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:41
`env.add_template("functions/unsupported.sql.j2",include_str!("../templates/functions/unsupported.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:46
`env.add_template("operators.sql",include_str!("../templates/operators.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:51
`env.add_template("aggregates.sql",include_str!("../templates/aggregates.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:56
`env.add_template("ore_fallback.sql",include_str!("../templates/ore_fallback.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/context.rs:61
`eql_domains::JSON.domains.iter().find(|d|d.name==JSON_ENTRY_DOMAIN)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `json_entry_type` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:46
`environment().get_template("types.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:104
`environment().get_template("types.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:106
`environment().get_template("query_types.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_query_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:126
`environment().get_template("query_types.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_query_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:128
`environment().get_template("functions.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:198
`environment().get_template("functions.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:200
`environment().get_template("operators.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_operators_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:241
`environment().get_template("operators.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_operators_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:243
`Term::term_for_operator(domain.terms,op.symbol.as_str())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_query_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:340
`environment().get_template("functions.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_query_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:400
`environment().get_template("functions.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_query_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:402
`environment().get_template("operators.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_query_operators_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:454
`environment().get_template("operators.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_query_operators_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:456
`environment().get_template("functions.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_json_entry_cross_functions` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:788
`environment().get_template("functions.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_json_entry_cross_functions` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:790
`environment().get_template("operators.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_json_entry_cross_operators` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:860
`environment().get_template("operators.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_json_entry_cross_operators` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:862
`environment().get_template("aggregates.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_aggregates_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:889
`environment().get_template("aggregates.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_aggregates_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:891
`environment().get_template("ore_fallback.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_ore_fallback_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:987
`environment().get_template("ore_fallback.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_ore_fallback_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/generate.rs:989
`PathBuf::from(env!("CARGO_MANIFEST_DIR")).parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `repo_root` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — packages/eql/crates/eql-codegen/src/lib.rs:28
What to do
Each row is a forced `Option`/`Result` no guard on its path proves present. Handle the absent case where it arises rather than forcing it: `?` to hand it to the caller, `if let` / `match` / `let … else` to branch on it, `unwrap_or` / `unwrap_or_default` / `unwrap_or_else` where a default is right. Where the value genuinely cannot be absent, say so in a way a reader can check from the line: test it first (`if x.is_none() { return … }`), look the key up with `contains_key` or the index against `len()`, or construct the value so it cannot be absent.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 9 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.
AXH1 Runtime security headers — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXI1 Runtime container hardening — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility (rendered) — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXS1 Runtime exposed surface — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
P12 CI test-gate honesty — 6 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 31 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXA1 Runtime unauthenticated reachability — This run crawled public routes only — it had no logged-in session, so there is no authenticated surface to compare anonymous access against and nothing was measured. This is a statement about this run, not about your application: nothing here says access control is missing, and nothing here says it is present.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 21 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the vitest suite in languages/typescript/packages/protect-ffi/integration-tests/ ran and not one test passed (JSON report written to /tmp/codehealth-noderel-484e01d2951048628cddc943adfaa5a8/run0-10.json), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
DM10 One transaction, one aggregate — no repository writes detected — no operation to judge against the one-aggregate rule
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Go, JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — Drizzle, GORM is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
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: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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
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
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
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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Orphaned knowledge languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge languages/typescript/packages/protect-ffi/crates/protect-ffi/src/js_plaintext.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge languages/typescript/packages/protect-ffi/crates/protect-ffi/src/client_options.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Boundary-crossing change coupling: encrypt.rs ↔ mod.rs packages/stack-encrypt-derive/src/encrypt.rs:1— `packages/stack-encrypt-derive/src/encrypt.rs` (context stack-encrypt-derive) and `packages/stack-encrypt/src/target/mod.rs` (context stack-encrypt) sit in DIFFERENT parts of the tree yet change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3e1b402a` feat(stack-encrypt)!: a context reaches its operations by being threa…; `e286459f` feat(stack-encrypt-derive): `#[stash(row = User)]` infers each field'…; `57a1f180` fix(stack-encrypt): address review on the context-parameter PR — run `git show` on any of them.
Boundary-crossing change coupling: decrypt.rs ↔ mod.rs packages/stack-encrypt-derive/src/decrypt.rs:1— `packages/stack-encrypt-derive/src/decrypt.rs` (context stack-encrypt-derive) and `packages/stack-encrypt/src/target/mod.rs` (context stack-encrypt) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3e1b402a` feat(stack-encrypt)!: a context reaches its operations by being threa…; `3d7a5b3d` fix(stack-encrypt): restore the decrypt-context bound; gate the _with…; `8d870b1a` fix(stack-encrypt): a row is implemented for `()` alone; a `from` fie… — run `git show` on any of them.
Flaky test: the repository rootscripts/__tests__/eql-suite-ci.test.mjs::the guard fails when a workflow stops calling a cargo check names every workflow whose deletion would orphan a cargo check — Passed 2×, failed 1× across repeated runs.
No assertions: rows carry each column its domain plaintext type languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:48— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: pins filter value types to the column plaintext languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:59— 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: rejects filters on storage-only columns at the type level languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:73— 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: rejects is(col, true) on queryable encrypted columns languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:89— 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: allows is(col, null) on every column, including storage-only ones languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:105— 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: allows order() on encrypted columns that carry an ordering term languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:114— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: rejects order() on encrypted columns with no ordering term languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:128— 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: still allows order() on a plaintext row key languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:146— 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: narrows matches() to freeTextSearch-capable columns languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:155— 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: pins the matches() operand to a string on encrypted columns languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:174— 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: rejects matches() on plaintext keys — use contains() languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:183— 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 native containment operand shapes via contains() languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:197— 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: rejects contains() on encrypted keys — use matches() languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:205— 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: rejects a container operand on a plaintext scalar column languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:217— 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: does not expose like/ilike on the v3 builder, at any chain depth languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:226— 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 plaintext model values on insert languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:242— 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: resolves responses to the row type languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:252— 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 undeclared tables reachable on the untyped surface (the gradient) languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:261— 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: rejects a v2 table in schemas languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:274— 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: rows default to Record<string, unknown> and from accepts any string languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:298— 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 an explicit row generic languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:306— 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: exposes matches and contains, but not like/ilike languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:315— 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 native containment operands, having no capability info to narrow with languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:334— 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: supports a no-arg select(), like supabase-js languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:346— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: contains() accepts a sub-document on the types.Json column languages/typescript/packages/stack-supabase/__tests__/supabase-v3.test-d.ts:367— 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.
Sync-over-async blocking languages/typescript/packages/cli/src/commands/db/config-scaffold.ts:122— `existsSync` in `offerStashConfig` 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 languages/typescript/packages/cli/src/commands/db/drizzle-migration.ts:21— `existsSync` in `findGeneratedMigration` 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 languages/typescript/packages/cli/src/commands/encrypt/context.ts:52— `fs.existsSync` in `loadEncryptionContext` 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 languages/typescript/packages/cli/src/commands/encrypt/context.ts:207— `fs.existsSync` in `callback to find` 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 languages/typescript/packages/cli/src/commands/encrypt/context.ts:249— `fs.readFileSync` in `Encryption` 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 languages/typescript/packages/cli/src/commands/encrypt/drizzle-helper.ts:53— `spawnSync` in `scaffoldDrizzleMigration` 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 languages/typescript/packages/cli/src/commands/encrypt/drizzle-helper.ts:103— `existsSync` in `listSqlFiles` 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 languages/typescript/packages/cli/src/commands/encrypt/lib/migration-file.ts:69— `fs.mkdirSync` in `writeMigrationFile` 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 languages/typescript/packages/cli/src/commands/encrypt/lib/migration-file.ts:76— `fs.writeFileSync` in `writeMigrationFile` 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 languages/typescript/packages/cli/src/commands/env/index.ts:237— `existsSync` in `resolveWriteTarget` 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 languages/typescript/packages/cli/src/commands/eql/migration.ts:470— `spawnSync` in `generateDrizzleEqlMigration` 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 languages/typescript/packages/cli/src/commands/eql/migration.ts:552— `writeFileSync` in `generateDrizzleEqlMigration` 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 languages/typescript/packages/cli/src/commands/eql/repair.ts:80— `existsSync` in `eqlRepairCommand` 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 languages/typescript/packages/cli/src/commands/impl/index.ts:173— `existsSync` in `implCommand` 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 languages/typescript/packages/cli/src/commands/impl/index.ts:187— `readFileSync` in `implCommand` 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 languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:101— `existsSync` in `run` 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 languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:132— `existsSync` in `run` 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 languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:132— `mkdirSync` in `run` 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 languages/typescript/packages/cli/src/commands/init/steps/build-schema.ts:133— `writeFileSync` in `run` 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 languages/typescript/packages/cli/src/commands/init/steps/install-deps.ts:350— `execSync` in `run` 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 languages/typescript/packages/cli/src/commands/schema/build.ts:39— `existsSync` in `builderCommand` 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 languages/typescript/packages/cli/src/commands/schema/build.ts:68— `existsSync` in `builderCommand` 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 languages/typescript/packages/cli/src/commands/schema/build.ts:69— `mkdirSync` in `builderCommand` 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 languages/typescript/packages/cli/src/commands/schema/build.ts:72— `writeFileSync` in `builderCommand` 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 languages/typescript/packages/cli/src/config/index.ts:212— `fs.existsSync` in `loadEncryptionClient` 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.
+ 15 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×40
Symbol treated as nullable, then dereferenced unguarded packages/stack-profile/src/profile_store.rs:574— `dirs::home_dir()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `default` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-kms/src/key_source.rs:443— `` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `generate_one` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/cipher.rs:2106— `store.init_workspace(PINNED)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/cipher.rs:2107— `store.init_workspace(CURRENT)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/cipher.rs:2109— `stack_kms::SecretKey::from_hex(Uuid::new_v4().to_string(),"00".repeat(32))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/cipher.rs:2112— `store.current_workspace_store()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/cipher.rs:2114— `store.current_workspace_store().unwrap().save_profile(&key)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `store_with_key_in_current_workspace` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/stack-encrypt/src/descriptor.rs:597— `NonEmpty::new(label)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `from` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:18— `env.add_template("types.sql",include_str!("../templates/types.sql.j2"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:23— `env.add_template("query_types.sql",include_str!("../templates/query_types.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:28— `env.add_template("functions.sql",include_str!("../templates/functions.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:36— `env.add_template("functions/extractor.sql.j2",include_str!("../templates/functions/extractor.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:41— `env.add_template("functions/wrapper.sql.j2",include_str!("../templates/functions/wrapper.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:46— `env.add_template("functions/unsupported.sql.j2",include_str!("../templates/functions/unsupported.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:51— `env.add_template("operators.sql",include_str!("../templates/operators.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:56— `env.add_template("aggregates.sql",include_str!("../templates/aggregates.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/context.rs:61— `env.add_template("ore_fallback.sql",include_str!("../templates/ore_fallback.sql.j2"),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `environment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:46— `eql_domains::JSON.domains.iter().find(|d|d.name==JSON_ENTRY_DOMAIN)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `json_entry_type` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:104— `environment().get_template("types.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:106— `environment().get_template("types.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:126— `environment().get_template("query_types.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_query_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:128— `environment().get_template("query_types.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_query_types_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:198— `environment().get_template("functions.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:200— `environment().get_template("functions.sql").unwrap().render(&ctx)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `render_functions_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded packages/eql/crates/eql-codegen/src/generate.rs:241— `environment().get_template("operators.sql")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_operators_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Repeated repair: packages/stack-encrypt/src/keyset.rs packages/stack-encrypt/src/keyset.rs:338— packages/stack-encrypt/src/keyset.rs changed 11 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is KeysetCache::insert at line 338), 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: “test(stack): pin mutation regression behavior”; “fix(stack-encrypt): a name ZeroKMS says is unbound orders like any answer, and a dropped answer is answered by its name first”; “fix(stack-encrypt): a losing lookup's answer is decided before its insert evicts the winner; the derive's keyset lifetime steps aside for a record's own”; “fix(stack-encrypt): a lookup whose answer lost is answered with the one that won, and eviction precedes binding”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt/src/keyset.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/device_session_refresher.rs packages/stack-auth/src/device_session_refresher.rs:111— packages/stack-auth/src/device_session_refresher.rs changed 13 times in last 90 days and 9 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 DeviceSessionRefresher::refresh at line 111), 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(stack-auth): report a failure to clear a spent session”; “fix(stack-auth): do not replay a refresh credential the issuer already rotated”; “fix(stack-auth): refuse another workspace's session before AutoRefresh sees it”; “fix(stack-auth): refuse a refreshed token for another workspace before saving it”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/device_session_refresher.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/auto_strategy.rs packages/stack-auth/src/auto_strategy.rs:111— packages/stack-auth/src/auto_strategy.rs changed 13 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is AutoStrategy::detect_inner at line 111), 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(stack-auth): wipe a non-UTF-8 CS_CLIENT_ACCESS_KEY before discarding it”; “fix(stack-encrypt): read the client key from the CRN's workspace too”; “fix(stack-auth,stack-profile): close the gaps review found in secret wiping”; “fix(stack-auth,stack-profile): clamp server expires_in and wipe secret buffers”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/auto_strategy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/transport.rs packages/stack-auth/src/transport.rs:434— packages/stack-auth/src/transport.rs changed 11 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ReqwestTransport::send at line 434), 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(stack-auth): fail closed when the blocklisted TLS config cannot be built”; “fix(stack-auth): refuse TLS chains carrying the compromised eMudhra CA keys”; “fix(stack-auth): a store error keeps its cause, and a missing transport says so”; “fix(stack-auth): a refused exchange's ServerError names the status, never the body”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/transport.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: scripts/impact-gate.py scripts/impact-gate.py:183— scripts/impact-gate.py changed 9 times in last 90 days and 9 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 impact-gate.declaration_lines at line 183), 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(impact): hash lizard 1.24.3 and move the misread fixtures to a live trigger”; “fix(ci): tell a closing `>` or `!` from one that continues the line”; “fix(ci): a declaration that continues on the next line is not whole”; “fix(ci): mark a span that ends on a whole one-line declaration”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- scripts/impact-gate.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/lib.rs packages/stack-auth/src/lib.rs:395— packages/stack-auth/src/lib.rs changed 15 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is stack_auth::cts_base_url_from_env at line 395), 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(stack-auth)!: finish token refreshes after caller cancellation”; “fix(stack-auth): refuse TLS chains carrying the compromised eMudhra CA keys”; “fix(stack-auth)!: one CTS token per provider JWT in OidcFederationStrategy”; “fix(stackauth): identify every auth request with a user-agent”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-kms/src/key_source.rs packages/stack-kms/src/key_source.rs:199— packages/stack-kms/src/key_source.rs changed 13 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is FakeDataKeySource::load_index_key at line 199), 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(stack-kms): the deterministic source refuses a wrong context as forbidden”; “fix: address code-review findings on the stack-kms index-key PR”; “fix(stack-kms): address code-review findings on keyset loading”; “fix(stack-kms): drop the Send bound on IndexKeySource futures for wasm32”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-kms/src/key_source.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/token.rs packages/stack-auth/src/token.rs:298— packages/stack-auth/src/token.rs changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is Token::refresh_with at line 298), 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(stack-auth,stack-profile): clamp server expires_in and wipe secret buffers”; “fix(stack-auth): a refused exchange's ServerError names the status, never the body”; “fix(stack-auth): a refused JWT takes no cache slot, and account refusals are shared”; “fix(stack-auth)!: one CTS token per provider JWT in OidcFederationStrategy”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/token.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-kms/src/client.rs packages/stack-kms/src/client.rs:163— packages/stack-kms/src/client.rs changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is Client::send_chunked at line 163), 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(stack): address review findings on the http feature split”; “fix: address code-review findings on the stack-kms index-key PR”; “fix(stack-kms): address code-review findings on keyset loading”; “fix(stack-kms): adapt keyset loading to the tracing + unused_results baseline”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-kms/src/client.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-kms/src/key.rs packages/stack-kms/src/key.rs:29— packages/stack-kms/src/key.rs changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is ClientKey::new_v1 at line 29), 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: address code-review findings on the stack-kms index-key PR”; “fix(stack-kms): address code-review findings on keyset loading”; “fix(stack-kms): adapt keyset loading to the tracing + unused_results baseline”; “fix(stack-kms): make FakeDataKeySource reject tag mismatches like ZeroKMS; mark unpublished”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-kms/src/key.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/auto_refresh.rs packages/stack-auth/src/auto_refresh.rs:292— packages/stack-auth/src/auto_refresh.rs changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is RefreshState::get_token at line 292), 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(stack-auth): give the initiating caller the token its refresh installed”; “fix(stack-auth)!: finish token refreshes after caller cancellation”; “fix(stack-auth): a refused JWT takes no cache slot, and account refusals are shared”; “fix(stack-auth)!: one CTS token per provider JWT in OidcFederationStrategy”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/auto_refresh.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: languages/typescript/packages/nextjs/src/session.ts languages/typescript/packages/nextjs/src/session.ts:52— languages/typescript/packages/nextjs/src/session.ts changed 8 times in last 90 days and 7 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 session.parseCtsToken at line 52), 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(nextjs): always write the session cookie Secure”; “fix(nextjs): forward the session only on responses that continue”; “fix(nextjs): forward the kept session through overrides that omit cookie”; “fix(nextjs): reject expired CTS tokens and reconcile caller cookie overrides”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/nextjs/src/session.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: languages/typescript/packages/nextjs/src/cts/index.ts languages/typescript/packages/nextjs/src/cts/index.ts:60— languages/typescript/packages/nextjs/src/cts/index.ts changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is index.readCtsRefusal at line 60), 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(nextjs): keep a failed Clerk token from failing the request”; “fix(nextjs): forward the session only on responses that continue”; “fix(nextjs): reject expired CTS tokens and reconcile caller cookie overrides”; “fix(nextjs): forward session changes to the request, survive CTS outages”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/nextjs/src/cts/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.
Repeated repair: packages/stack-auth/src/device_session_strategy.rs packages/stack-auth/src/device_session_strategy.rs:193— packages/stack-auth/src/device_session_strategy.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is DeviceSessionStrategyBuilder::build at line 193), 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(stack-auth): refuse another workspace's session before AutoRefresh sees it”; “fix(stack-auth): refuse a refreshed token for another workspace before saving it”; “fix(stack-auth): address review of CRN pinning; update stash-auth skill”; “fix(stack-auth): honour CS_WORKSPACE_CRN on the device-session path”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/device_session_strategy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-auth/src/device_code/mod.rs packages/stack-auth/src/device_code/mod.rs:341— packages/stack-auth/src/device_code/mod.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is PendingDeviceCode::poll_for_token at line 341), 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(stack-auth,stack-profile): enforce the device-code deadline and validate UTF-8”; “fix(stack-auth,stack-profile): close the gaps review found in secret wiping”; “fix(stack-auth,stack-profile): clamp server expires_in and wipe secret buffers”; “fix(stack-auth): a refused exchange's ServerError names the status, never the body”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/device_code/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: REDACTED REDACTED:456— REDACTED changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is lint-no-eql-registry-pins.collectNpmEntries at line 456), 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: repath relative paths that climb out of a moved package”; “fix(cli): address safe reinstall review feedback”; “fix(eql): act on the differential audit against encrypt-query-language”; “fix(release): close the audit gaps from the #885 and #915 reviews”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11: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.
Repeated repair: packages/stack-auth/src/device_client.rs packages/stack-auth/src/device_client.rs:75— packages/stack-auth/src/device_client.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is DeviceClientError::payload at line 75), 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(stack-encrypt): pin every error payload in tests and drop Reason's two 36-arm matches”; “fix(stack-auth)!: one CTS token per provider JWT in OidcFederationStrategy”; “fix(stackauth): identify every auth request with a user-agent”; “test(stack): pin mutation regression behavior”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/device_client.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stack-kms/src/connection.rs packages/stack-kms/src/connection.rs:63— packages/stack-kms/src/connection.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is ZeroKMSConnection::ensure_base_url at line 63), 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(stack): address review findings on the http feature split”; “fix: address code-review findings on the stack-kms index-key PR”; “fix(stack-kms,cipherstash-client): address remaining code-review findings”; “fix(stack-kms): address review findings; close test-coverage gaps”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-kms/src/connection.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: languages/golang/internal/guest/call.go languages/golang/internal/guest/call.go:110— languages/golang/internal/guest/call.go changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is guest.Place at line 110), 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(golang): probe Place's out-slots by reading them and count se_alloc calls in the test”; “fix(golang): validate Place's out-slots before allocating”; “fix(golang): take the allocation size as uint64 to satisfy gosec G115”; “fix(golang): wipe guest buffers on failed placement and close stashgen's engine”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/internal/guest/call.go`: 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/stack-auth/src/oidc_refresher.rs packages/stack-auth/src/oidc_refresher.rs:171— packages/stack-auth/src/oidc_refresher.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is OidcFederation::federate at line 171), 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(stack-auth): a refused exchange's ServerError names the status, never the body”; “fix(stack-auth): a cancelled first exchange leaves nothing pending”; “fix(stack-auth): a refused JWT takes no cache slot, and account refusals are shared”; “fix(stack-auth)!: one CTS token per provider JWT in OidcFederationStrategy”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-auth/src/oidc_refresher.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: languages/typescript/packages/nextjs/src/sync.ts languages/typescript/packages/nextjs/src/sync.ts:90— languages/typescript/packages/nextjs/src/sync.ts changed 6 times in last 90 days and 5 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 sync.decideSession at line 90), 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(nextjs): keep a failed Clerk token from failing the request”; “fix(nextjs): forward the session only on responses that continue”; “fix(nextjs): reconcile a session cookie the caller's response already sets”; “fix(nextjs): forward session changes to the request, survive CTS outages”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/nextjs/src/sync.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/eql/crates/eql-codegen/src/generate.rs packages/eql/crates/eql-codegen/src/generate.rs:1101— packages/eql/crates/eql-codegen/src/generate.rs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is eql_codegen::generate::generate_all at line 1101), 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(eql): keep cross-pair blockers recognisable to the lints”; “fix(eql): drop private tracker ids from comments”; “fix(eql): schema-qualify operators in comparison wrapper bodies”; “fix(eql): drop private tracker id from comments and docs”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/eql/crates/eql-codegen/src/generate.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: languages/typescript/packages/stack-supabase/src/query-results.ts languages/typescript/packages/stack-supabase/src/query-results.ts:169— languages/typescript/packages/stack-supabase/src/query-results.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 query-results.decryptResults at line 169), 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(stack-supabase): keep jsonb keys out of the ciphertext error”; “fix(stack-supabase): name the row index in the ciphertext error”; “fix(stack-supabase): refuse plaintext-table rows that still hold ciphertext”; “fix(stack-supabase): read tables that have no encrypted columns”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/stack-supabase/src/query-results.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/stack-encrypt/src/plan/value.rs packages/stack-encrypt/src/plan/value.rs:446— packages/stack-encrypt/src/plan/value.rs 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 3 (its worst body is ValuePlanBuilder::checked_context at line 446), 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(stack-encrypt): a one-value plan's errors name the value, never its context”; “fix(stack-encrypt): seal JoinContext, drop an uncalled try_map, say how a Stored plan runs”; “fix(stack-encrypt): a one-value plan builds over a target of any context”; “fix(stack-encrypt): an empty batch still has its context checked before any key request”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt/src/plan/value.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: languages/typescript/packages/nextjs/src/index.ts languages/typescript/packages/nextjs/src/index.ts:72— languages/typescript/packages/nextjs/src/index.ts changed 6 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 7 (its worst body is index.getCtsToken at line 72), 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(nextjs): keep a failed Clerk token from failing the request”; “fix(nextjs): forward session changes to the request, survive CTS outages”; “fix(nextjs): match sessions on issuer and subject, validate CTS tokens”; “fix(nextjs): harden the CipherStash session cookie”. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/nextjs/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.
Swallowed exception (empty catch) languages/typescript/packages/wizard/src/lib/analytics.ts:171— 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) languages/typescript/packages/wizard/src/lib/gather.ts:390— 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) languages/typescript/packages/wizard/src/lib/gather.ts:421— 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) languages/typescript/packages/wizard/src/lib/gather.ts:449— 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) languages/typescript/packages/wizard/src/agent/fetch-prompt.ts:90— 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) languages/typescript/packages/stack-supabase/src/introspect.ts:239— `.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) languages/typescript/packages/stack/src/wasm-inline.ts:618— 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) languages/typescript/packages/protect-ffi/src/index.cts:146— 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) languages/typescript/packages/profile/stack-profile-node.js:12— 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) languages/typescript/packages/profile/stack-profile-node.js:50— 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) languages/typescript/packages/profile/stack-profile-node.js:55— 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) languages/typescript/packages/migrate/src/engine.ts:256— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) languages/typescript/packages/cli/src/telemetry/index.ts:240— 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) languages/typescript/packages/cli/src/telemetry/index.ts:323— `.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) languages/typescript/packages/cli/src/telemetry/index.ts:399— `.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) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:667— `.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) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:689— `.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) languages/typescript/packages/cli/src/installer/index.ts:240— `.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) languages/typescript/packages/cli/src/installer/installation-state.ts:88— `.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) languages/typescript/packages/cli/src/installer/installation-state.ts:181— `.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) languages/typescript/packages/cli/src/installer/installation-state.ts:269— `.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) languages/typescript/packages/cli/src/installer/verify.ts:552— `.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) languages/typescript/packages/cli/src/installer/verify.ts:555— `.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) languages/typescript/packages/cli/src/installer/verify.ts:672— `.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) languages/typescript/packages/cli/src/installer/verify.ts:675— `.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.
+ 10 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×26
No test reaches this file languages/typescript/packages/wizard/src/lib/gather.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 languages/typescript/packages/wizard/src/run.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 languages/typescript/packages/stack-prisma/migrations/20260601T0100_install_eql_v3_bundle/migration.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 languages/typescript/packages/wizard/src/lib/analytics.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 REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file languages/typescript/packages/cli/src/commands/doctor/index.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/eql/packages/eql/scripts/sync-generated.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 languages/typescript/packages/wizard/src/agent/fetch-prompt.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 languages/typescript/packages/stack-prisma/migrations/20261002T0000_upgrade_eql_v3_3_0_6/migration.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 languages/typescript/packages/wizard/src/lib/types.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 languages/typescript/packages/stack-prisma/migrations/20261005T0000_upgrade_eql_v3_3_1_0/migration.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 languages/typescript/packages/wizard/src/lib/changelog.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 languages/typescript/packages/stack-prisma/migrations/20260814T0000_upgrade_eql_v3_3_0_5/migration.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 languages/typescript/packages/utils/config/index.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 languages/typescript/packages/stack-prisma/src/exports/contract-space-typing.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 languages/typescript/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.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 languages/typescript/packages/cli/src/commands/schema/build.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 languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.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 languages/typescript/packages/cli/src/commands/telemetry/index.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 languages/typescript/packages/cli/src/commands/db/test-connection.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file languages/typescript/packages/cli/src/commands/encrypt/plan.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 languages/typescript/packages/protect-ffi/scripts/changelog-extract.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/eql/packages/eql/scripts/npm-publish.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 languages/typescript/packages/cli/src/commands/manifest/index.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 languages/typescript/packages/stack/scripts/install-eql-v3.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.
Hotspot: packages/stack-encrypt/src/dynamic/record.rs packages/stack-encrypt/src/dynamic/record.rs:1064— packages/stack-encrypt/src/dynamic/record.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in stack_encrypt::dynamic::record::plan_with at line 1064. 11 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt/src/dynamic/record.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: languages/golang/encrypt/client.go languages/golang/encrypt/client.go:68— languages/golang/encrypt/client.go changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in encrypt.NewClient at line 68. 1 of those changes was a fix/bug commit, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/encrypt/client.go`: 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/stack-encrypt-derive/src/shape.rs packages/stack-encrypt-derive/src/shape.rs:313— packages/stack-encrypt-derive/src/shape.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in stack_encrypt_derive::shape::collect at line 313. 10 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt-derive/src/shape.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: languages/typescript/packages/cli/src/commands/decrypt/backfill.ts languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111— languages/typescript/packages/cli/src/commands/decrypt/backfill.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in backfill.decryptBackfillCommand at line 111. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/commands/decrypt/backfill.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/stack-encrypt-derive/src/attrs.rs packages/stack-encrypt-derive/src/attrs.rs:42— packages/stack-encrypt-derive/src/attrs.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ContainerAttrs::parse at line 42. 5 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt-derive/src/attrs.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: languages/golang/stashgen/read.go languages/golang/stashgen/read.go:222— languages/golang/stashgen/read.go changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in reader.build at line 222. 4 of those changes were fix/bug commits, and the other 6 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/stashgen/read.go`: 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/stack-encrypt/src/descriptor.rs packages/stack-encrypt/src/descriptor.rs:178— packages/stack-encrypt/src/descriptor.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Descriptor::render at line 178. 5 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- packages/stack-encrypt/src/descriptor.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: languages/golang/internal/record/record.go languages/golang/internal/record/record.go:203— languages/golang/internal/record/record.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in Plan.Validate at line 203. 4 of those changes were fix/bug commits, and the other 4 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/internal/record/record.go`: 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: languages/golang/stashgen/engine.go languages/golang/stashgen/engine.go:119— languages/golang/stashgen/engine.go changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in stashgen.lowerDeclaration at line 119. 4 of those changes were fix/bug commits, and the other 6 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/stashgen/engine.go`: 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: languages/typescript/packages/migrate/src/decrypt.ts languages/typescript/packages/migrate/src/decrypt.ts:266— languages/typescript/packages/migrate/src/decrypt.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in decrypt.runDecryptBackfill at line 266. 7 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/migrate/src/decrypt.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: languages/golang/stashgen/emit.go languages/golang/stashgen/emit.go:251— languages/golang/stashgen/emit.go changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in writer.declaration at line 251. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/stashgen/emit.go`: 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: languages/golang/encrypt/records.go languages/golang/encrypt/records.go:385— languages/golang/encrypt/records.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Client.open at line 385. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/encrypt/records.go`: 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: languages/golang/encrypt/gensupport/convert.go languages/golang/encrypt/gensupport/convert.go:29— languages/golang/encrypt/gensupport/convert.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in gensupport.convert at line 29. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/encrypt/gensupport/convert.go`: 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: languages/typescript/packages/stack-supabase/src/create.ts languages/typescript/packages/stack-supabase/src/create.ts:218— languages/typescript/packages/stack-supabase/src/create.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in create.construct at line 218. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/stack-supabase/src/create.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: languages/typescript/packages/cli/src/commands/db/status.ts languages/typescript/packages/cli/src/commands/db/status.ts:8— languages/typescript/packages/cli/src/commands/db/status.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in status.statusCommand at line 8. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/commands/db/status.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: languages/typescript/packages/migrate/src/column-migration.ts languages/typescript/packages/migrate/src/column-migration.ts:162— languages/typescript/packages/migrate/src/column-migration.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in column-migration.deriveColumnMigration at line 162. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/migrate/src/column-migration.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: languages/typescript/packages/cli/src/commands/db/install.ts languages/typescript/packages/cli/src/commands/db/install.ts:101— languages/typescript/packages/cli/src/commands/db/install.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in install.installCommand at line 101. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/commands/db/install.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: languages/golang/encrypt/checker.go languages/golang/encrypt/checker.go:112— languages/golang/encrypt/checker.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in encrypt.parseTarget at line 112. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/encrypt/checker.go`: 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: languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:494— languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in derived-search-index-restoration.inspectReinstallDependencies at line 494. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/installer/derived-search-index-restoration.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: languages/typescript/packages/cli/src/commands/decrypt/plan.ts languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81— languages/typescript/packages/cli/src/commands/decrypt/plan.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in plan.decryptPlanCommand at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/commands/decrypt/plan.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: scripts/lint-no-workflow-caching.mjs scripts/lint-no-workflow-caching.mjs:333— scripts/lint-no-workflow-caching.mjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in lint-no-workflow-caching.checkStep at line 333. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- scripts/lint-no-workflow-caching.mjs`: 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: languages/typescript/packages/cli/src/installer/installation-state.ts languages/typescript/packages/cli/src/installer/installation-state.ts:78— languages/typescript/packages/cli/src/installer/installation-state.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in installation-state.assessEqlInstallation at line 78. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/installer/installation-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: languages/typescript/packages/cli/src/commands/encrypt/status.ts languages/typescript/packages/cli/src/commands/encrypt/status.ts:143— languages/typescript/packages/cli/src/commands/encrypt/status.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in status.renderRow at line 143. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/typescript/packages/cli/src/commands/encrypt/status.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: languages/golang/stashgen/policy.go languages/golang/stashgen/policy.go:98— languages/golang/stashgen/policy.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in stashgen.generateFor at line 98. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 10:01:51 +11:00' --until='2026-11-17 10:01:51 +11:00' --full-history --no-merges -- languages/golang/stashgen/policy.go`: 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.
Boundary violation [package:test-cross-package-internals] e2e/tests/package-managers.e2e.test.ts:8— e2e/tests/package-managers.e2e.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/base.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] e2e/tests/package-managers.e2e.test.ts:9— e2e/tests/package-managers.e2e.test.ts:9 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/drizzle.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] e2e/tests/package-managers.e2e.test.ts:10— e2e/tests/package-managers.e2e.test.ts:10 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/providers/supabase.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] e2e/tests/skill-map-parity.e2e.test.ts:23— e2e/tests/skill-map-parity.e2e.test.ts:23 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/commands/init/lib/install-skills.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:undeclared-workspace-dep] languages/typescript/packages/cli/src/commands/encrypt/context.ts:123— languages/typescript/packages/cli/src/commands/encrypt/context.ts:123 imports @cipherstash/stack-drizzle, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-drizzle/integration/adapter.ts:6— languages/typescript/packages/stack-drizzle/integration/adapter.ts:6 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:6— languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:6 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/adapter.ts:2— languages/typescript/packages/stack-prisma/integration/adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/adapter.ts:24— languages/typescript/packages/stack-prisma/integration/adapter.ts:24 imports languages/typescript/packages/stack-prisma/test/live/helpers/harness.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/adapter.ts:35— languages/typescript/packages/stack-prisma/integration/adapter.ts:35 imports languages/typescript/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/json-adapter.ts:2— languages/typescript/packages/stack-prisma/integration/json-adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/json-adapter.ts:20— languages/typescript/packages/stack-prisma/integration/json-adapter.ts:20 imports languages/typescript/packages/stack-prisma/test/live/helpers/harness.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-prisma/integration/json-adapter.ts:31— languages/typescript/packages/stack-prisma/integration/json-adapter.ts:31 imports languages/typescript/packages/stack-prisma/test/v3/operator-lowering-v3.helpers.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack-supabase/integration/adapter.ts:2— languages/typescript/packages/stack-supabase/integration/adapter.ts:2 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] languages/typescript/packages/stack/integration/wasm/adapter.ts:29— languages/typescript/packages/stack/integration/wasm/adapter.ts:29 imports languages/typescript/packages/test-kit/src/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:undeclared-workspace-dep] languages/typescript/packages/stack/integration/wasm/adapter.ts:29— languages/typescript/packages/stack/integration/wasm/adapter.ts:29 imports @cipherstash/test-kit, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/cli-live-postgres-ci.test.mjs:68— scripts/__tests__/cli-live-postgres-ci.test.mjs:68 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/vitest.config.ts?cli-live-ci-contract) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/cli-vitest-alias.test.mjs:3— scripts/__tests__/cli-vitest-alias.test.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/vitest.config.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.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/sync-skill-pins.test.mjs:14— scripts/__tests__/sync-skill-pins.test.mjs:14 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/cli/src/release-train.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.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/wasm-core-contract-ci.test.mjs:4— scripts/__tests__/wasm-core-contract-ci.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack/vitest.config.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.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/wasm-core-contract-ci.test.mjs:5— scripts/__tests__/wasm-core-contract-ci.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack/vitest.wasm-core.config.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.
Boundary violation [package:test-cross-package-internals] scripts/__tests__/wasm-core-contract-ci.test.mjs:8— scripts/__tests__/wasm-core-contract-ci.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../languages/typescript/packages/stack-supabase/vitest.config.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.
FunctionTooLong: interface.initializeAgent languages/typescript/packages/wizard/src/agent/interface.ts:292— FunctionTooLong — initializeAgent runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.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.
FunctionTooLong: interface.initializeAgent.run languages/typescript/packages/wizard/src/agent/interface.ts:299— FunctionTooLong — initializeAgent.run runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: adapter.makeWasmAdapter languages/typescript/packages/stack/integration/wasm/adapter.ts:136— FunctionTooLong — makeWasmAdapter runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× 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: run.run languages/typescript/packages/wizard/src/run.ts:40— FunctionTooLong — run runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: query-filters.applyFilters languages/typescript/packages/stack-supabase/src/query-filters.ts:136— FunctionTooLong — applyFilters runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: verify.diffSurface languages/typescript/packages/cli/src/installer/verify.ts:719— FunctionTooLong — diffSurface runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× 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: backfill.backfillCommand languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:113— FunctionTooLong — backfillCommand runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: protect_ffi::to_query_plaintext languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1271— FunctionTooLong — protect_ffi::to_query_plaintext runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: client-v3.createEncryptionClient languages/typescript/packages/stack/src/encryption/client-v3.ts:448— FunctionTooLong — createEncryptionClient 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: backfill.decryptBackfillCommand languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111— FunctionTooLong — decryptBackfillCommand runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: plan.decryptPlanCommand languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81— FunctionTooLong — decryptPlanCommand runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: adapter.makePrismaNextAdapter languages/typescript/packages/stack-prisma/integration/adapter.ts:122— FunctionTooLong — makePrismaNextAdapter runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: query-terms.collectQueryTerms languages/typescript/packages/stack-supabase/src/query-terms.ts:112— FunctionTooLong — collectQueryTerms runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: protect_ffi::eql_v3::target_domain_for_column languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:183— FunctionTooLong — protect_ffi::eql_v3::target_domain_for_column runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: stack_encrypt_derive::decrypt::derive packages/stack-encrypt-derive/src/decrypt.rs:8— FunctionTooLong — stack_encrypt_derive::decrypt::derive runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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: sdk-adapter-v3.createCipherstashV3Sdk languages/typescript/packages/stack-prisma/src/v3/sdk-adapter-v3.ts:112— FunctionTooLong — createCipherstashV3Sdk runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.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: migration.generateDrizzleEqlMigration languages/typescript/packages/cli/src/commands/eql/migration.ts:386— FunctionTooLong — generateDrizzleEqlMigration runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: adapter.makeDrizzleAdapter languages/typescript/packages/stack-drizzle/integration/adapter.ts:61— FunctionTooLong — makeDrizzleAdapter runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: install.installCommand languages/typescript/packages/cli/src/commands/db/install.ts:101— FunctionTooLong — installCommand 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.
FunctionTooLong: adapter.makeSupabaseAdapter languages/typescript/packages/stack-supabase/integration/adapter.ts:60— FunctionTooLong — makeSupabaseAdapter runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: eql_codegen::targets::render_targets_from packages/eql/crates/eql-codegen/src/targets.rs:189— FunctionTooLong — eql_codegen::targets::render_targets_from runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×21
Recursive walk over a caller-supplied document has no depth cap packages/stack-kms/src/errors.rs:759— `payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 759 with a piece of the document (and at line 760, line 761, line 762) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` 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/stack-guest-abi/src/last_error.rs:302— `encode` is public, takes a document from its caller (line 190) and hands it to `json_value`, which calls itself at line 302 with a piece of the document (and at line 307) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `json_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/stack-encrypt/src/cipher.rs:310— `payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 310 with a piece of the document (and at line 311, line 312) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` 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/stack-encrypt/src/cipher.rs:1330— `key_count` is public and takes a `PendingStackCipherText` as its receiver from its caller, and it calls itself at line 1330 with a piece of the document (and at line 1332) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `key_count` 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/stack-encrypt/src/cipher.rs:1429— `seal_with` is public and takes a `PendingStackCipherText` as its receiver from its caller, and it calls itself at line 1429 with a piece of the document (and at line 1436) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `seal_with` 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/stack-encrypt/src/sem/mod.rs:213— `payload` is public and takes a `TermError` as its receiver from its caller, and it calls itself at line 213 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` 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/stack-encrypt/src/dynamic/mod.rs:393— `payload` is public and takes a `Error` as its receiver from its caller, and it calls itself at line 393 with a piece of the document (and at line 394) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `payload` 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 languages/typescript/packages/stack-auth-wasm/src/lib.rs:329— `get_token` is public and takes a `AccessKeyStrategy` as its receiver from its caller, and it calls itself at line 329 with a piece of the document (and at line 259, line 261, line 349, line 350, line 468) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token` 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 languages/typescript/packages/stack-auth-wasm/src/lib.rs:481— `get_token_for_jwt` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 481 with a piece of the document (and at line 356, line 357) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token_for_jwt` 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 languages/typescript/packages/stack/src/dynamodb/helpers.ts:430— `toEncryptedDynamoItem` is exported, takes a document from its caller (line 357) and hands it to `processValue`, which calls itself at line 430 (`processValue`) with a piece of `attrValue` — and nowhere in `processValue` 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 `processValue` 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 languages/typescript/packages/stack/src/dynamodb/helpers.ts:621— `toEncryptedDynamoItem` is exported, takes a document from its caller (line 357) and hands it to `processValue`, which calls itself at line 621 (`processValue`) with a piece of `attrValue` — and nowhere in `processValue` 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 `processValue` 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 languages/typescript/packages/profile/src/lib.rs:57— `dir` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 57 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `dir` 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 languages/typescript/packages/profile/src/lib.rs:64— `set_current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 64 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_current_workspace` 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 languages/typescript/packages/profile/src/lib.rs:73— `current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 73 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `current_workspace` 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 languages/typescript/packages/profile/src/lib.rs:79— `clear_current_workspace` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 79 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `clear_current_workspace` 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 languages/typescript/packages/profile/src/lib.rs:85— `list_workspaces` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 85 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `list_workspaces` 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 languages/typescript/packages/profile/src/lib.rs:93— `workspace_store` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 93 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `workspace_store` 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 languages/typescript/packages/profile/src/lib.rs:105— `current_workspace_store` is public and takes a `ProfileStore` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `current_workspace_store` 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 languages/typescript/packages/nextjs/src/session.ts:59— `nonEmptyString` is exported and takes `value: unknown` from its caller, and it calls itself at line 59 (`nonEmptyString`) with a piece of `value` (and at line 77) — and nowhere in `nonEmptyString` 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 `nonEmptyString` 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 languages/typescript/packages/auth/src/lib.rs:446— `get_token` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 446 with a piece of the document (and at line 447) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token` 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 languages/typescript/packages/auth/src/lib.rs:463— `get_token_for_jwt` is public and takes a `OidcFederationStrategy` as its receiver from its caller, and it calls itself at line 463 with a piece of the document (and at line 464) — and nowhere in the walk is a depth or nesting counter compared with a bound. 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. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `get_token_for_jwt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×17
FileTooLong: src/lib.rs languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs— FileTooLong — 1380 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 41 free functions. The bar is 500 significant lines; this is 880 over it, 2.76× 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/cipher.rs packages/stack-encrypt/src/cipher.rs— FileTooLong — 885 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 385 over it, 1.77× 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: dynamic/record.rs packages/stack-encrypt/src/dynamic/record.rs— FileTooLong — 876 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 376 over it, 1.75× 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/wasm.rs languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs— FileTooLong — 732 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 232 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: stashgen/read.go languages/golang/stashgen/read.go— FileTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 135 over it, 1.27× 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/generate.rs packages/eql/crates/eql-codegen/src/generate.rs— FileTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 125 over it, 1.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: installer/verify.ts languages/typescript/packages/cli/src/installer/verify.ts— FileTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 88 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/wasm-inline.ts languages/typescript/packages/stack/src/wasm-inline.ts— FileTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 78 over it, 1.16× 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/error.rs packages/stack-auth/src/error.rs— FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 73 over it, 1.15× 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: plan/chain.rs packages/stack-encrypt/src/plan/chain.rs— FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 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: v3/operators-v3.ts languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts— FileTooLong — 562 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 62 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cli/registry.ts languages/typescript/packages/cli/src/cli/registry.ts— FileTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 49 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/operators.ts languages/typescript/packages/stack-drizzle/src/operators.ts— FileTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: createEncryptionOperators (204-967). The bar is 500 significant lines; this is 43 over it, 1.09× 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: lib/setup-prompt.ts languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts— FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/types.ts languages/typescript/packages/stack-supabase/src/types.ts— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 24 over it, 1.05× 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: installer/derived-search-index-restoration.ts languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts— FileTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×13
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
AXH1 · Runtime security headers· Runtime security header not set · ×11
Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-embedder-policy — The live app's responses did not include cross-origin-embedder-policy (recommended by the OWASP Secure Headers Project (value: require-corp)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-opener-policy — The live app's responses did not include cross-origin-opener-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: cross-origin-resource-policy — The live app's responses did not include cross-origin-resource-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-content-type-options — The live app's responses did not include x-content-type-options (stops MIME-sniffing (expects 'nosniff')). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-dns-prefetch-control — The live app's responses did not include x-dns-prefetch-control (recommended by the OWASP Secure Headers Project (value: off)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
Runtime security header not set: x-permitted-cross-domain-policies — The live app's responses did not include x-permitted-cross-domain-policies (recommended by the OWASP Secure Headers Project (value: none)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×7
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×7
Edited copy of a member (8 corresponding lines) languages/golang/encrypt/cipher.go:61— languages/golang/encrypt/cipher.go:61-71 | languages/golang/encrypt/cipher.go:93-100 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) packages/stack-profile/src/profile_store.rs:204— packages/stack-profile/src/profile_store.rs:204-211 | packages/stack-profile/src/profile_store.rs:493-501 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) languages/golang/encrypt/guest/src/ops.rs:165— languages/golang/encrypt/guest/src/ops.rs:165-172 | languages/golang/encrypt/guest/src/ops.rs:199-207 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) packages/stack-kms/src/key.rs:72— packages/stack-kms/src/key.rs:72-79 | packages/stack-kms/src/key.rs:264-271 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/client_options.rs:57— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/client_options.rs:57-64 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/client_options.rs:87-94 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) packages/stack-kms/src/errors.rs:116— packages/stack-kms/src/errors.rs:116-123 | packages/stack-kms/src/errors.rs:127-134 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) languages/typescript/packages/auth/src/lib.rs:174— languages/typescript/packages/auth/src/lib.rs:174-181 | languages/typescript/packages/auth/src/lib.rs:206-213 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) languages/golang/encrypt/guest/src/abi.rs:363— languages/golang/encrypt/guest/src/abi.rs:363-369 | languages/golang/encrypt/guest/src/abi.rs:396-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/golang/encrypt/guest/src/abi.rs:363` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) packages/eql/crates/eql-codegen/src/generate.rs:740— packages/eql/crates/eql-codegen/src/generate.rs:740-746 | packages/eql/crates/eql-codegen/src/generate.rs:834-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/eql/crates/eql-codegen/src/generate.rs:740` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) packages/eql/crates/eql-codegen/src/targets.rs:291— packages/eql/crates/eql-codegen/src/targets.rs:291-297 | packages/eql/crates/eql-codegen/src/targets.rs:320-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/eql/crates/eql-codegen/src/targets.rs:291` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) packages/stack-encrypt/src/dynamic/record.rs:1291— packages/stack-encrypt/src/dynamic/record.rs:1291-1297 | packages/stack-encrypt/src/dynamic/record.rs:1484-1490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/stack-encrypt/src/dynamic/record.rs:1291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) packages/eql/tasks/docs/generate/xml-to-json.py:194— packages/eql/tasks/docs/generate/xml-to-json.py:194-200 | packages/eql/tasks/docs/generate/xml-to-markdown.py:684-690 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/eql/tasks/docs/generate/xml-to-json.py:202` calls `Path` and `packages/eql/tasks/docs/generate/xml-to-markdown.py:692` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) languages/golang/encrypt/gensupport/convert.go:185— languages/golang/encrypt/gensupport/convert.go:185-191 | languages/golang/encrypt/gensupport/convert.go:198-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) docs/plans/2026-10-04-plan-builder/accounts/account.go:33— docs/plans/2026-10-04-plan-builder/accounts/account.go:33-39 | docs/plans/2026-10-04-plan-builder/contacts/contacts.go:60-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
P12 · CI test-gate honesty· Runner config excludes tests no gate runs · ×6
Runner config excludes tests no gate runs e2e/vitest.config.ts:16— `tests/protect-dynamodb-compat.e2e.test.ts` removes 37 test(s) in 1 file(s) (e.g. `e2e/tests/protect-dynamodb-compat.e2e.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs e2e/vitest.config.ts:17— `tests/protect-crossover.e2e.test.ts` removes 12 test(s) in 1 file(s) (e.g. `e2e/tests/protect-crossover.e2e.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs e2e/vitest.config.ts:18— `tests/protect-postgres-upgrade.e2e.test.ts` removes 7 test(s) in 1 file(s) (e.g. `e2e/tests/protect-postgres-upgrade.e2e.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs e2e/vitest.config.ts:19— `tests/protect-guide-example.e2e.test.ts` removes 1 test(s) in 1 file(s) (e.g. `e2e/tests/protect-guide-example.e2e.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs languages/typescript/packages/cli/vitest.config.ts:27— `**/*.live.test.ts` removes 58 test(s) in 10 file(s) (e.g. `languages/typescript/packages/cli/src/installer/__tests__/guarded-grants.live.test.ts`, `languages/typescript/packages/cli/src/installer/__tests__/preflight.live.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs languages/typescript/packages/stack-prisma/vitest.config.ts:9— `integration/**` removes 2 test(s) in 2 file(s) (e.g. `languages/typescript/packages/stack-prisma/integration/families.integration.test.ts`, `languages/typescript/packages/stack-prisma/integration/json.integration.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) packages/stack-auth/src/device_client.rs:75— packages/stack-auth/src/device_client.rs:75-84 | packages/stack-kms/src/builder.rs:56-65 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) languages/typescript/packages/stack-auth-wasm/src/lib.rs:280— languages/typescript/packages/stack-auth-wasm/src/lib.rs:280-289 | languages/typescript/packages/stack-auth-wasm/src/lib.rs:308-324 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) languages/golang/encrypt/policy/policy.go:193— languages/golang/encrypt/policy/policy.go:193-205 | languages/golang/stashgen/declaration.go:122-131 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) languages/golang/auth/transport.go:188— languages/golang/auth/transport.go:188-197 | languages/golang/encrypt/transport.go:241-251 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) packages/stack-encrypt/src/plan/chain.rs:417— packages/stack-encrypt/src/plan/chain.rs:417-426 | packages/stack-encrypt/src/plan/chain.rs:743-754 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 2) packages/eql/crates/eql-codegen/src/generate.rs:312— packages/eql/crates/eql-codegen/src/generate.rs:312-319 | packages/eql/crates/eql-codegen/src/generate.rs:419-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/eql/crates/eql-codegen/src/generate.rs:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/eql/crates/eql-codegen/src/generate.rs:322` calls `extractor_terms`, `push`, `extractor_entry` and `packages/eql/crates/eql-codegen/src/generate.rs:427` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) packages/eql/crates/eql-codegen/src/generate.rs:1150— packages/eql/crates/eql-codegen/src/generate.rs:1150-1157 | packages/eql/crates/eql-codegen/src/generate.rs:1199-1206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) packages/stack-auth/src/access_key_strategy.rs:190— packages/stack-auth/src/access_key_strategy.rs:190-197 | packages/stack-auth/src/oidc_federation_strategy.rs:518-525 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) packages/stack-encrypt-derive/src/encrypt.rs:164— packages/stack-encrypt-derive/src/encrypt.rs:164-171 | packages/stack-encrypt-derive/src/encrypt.rs:185-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) languages/golang/encrypt/records.go:163— languages/golang/encrypt/records.go:163-170 | languages/golang/encrypt/records.go:199-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/golang/encrypt/records.go:163` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Swallowed exception (caught, then discarded) REDACTED:64— `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.
Swallowed exception (caught, then discarded) languages/typescript/packages/stack-prisma/integration/adapter.ts:305— `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.
Swallowed exception (caught, then discarded) languages/typescript/packages/stack-drizzle/integration/adapter.ts:217— `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.
Swallowed exception (caught, then discarded) languages/typescript/packages/cli/src/telemetry/index.ts:357— `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.
Swallowed exception (caught, then discarded) languages/typescript/packages/cli/src/commands/init/lib/env-keys.ts:26— `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.
TodoComment packages/stack-auth/src/token.rs:359— // TODO(CIP-2793): The server should include device_instance_id in the
TodoComment languages/typescript/packages/stack/__tests__/bulk-protect.test.ts:207— // TODO: Add proper JWT token handling for CI — 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 languages/typescript/packages/cli/src/commands/init/lib/__tests__/setup-prompt.test.ts:43— // version of this prompt drove the agent into a fixed TODO list which — 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 languages/typescript/packages/cli/src/commands/auth/region.ts:19— // TODO: pull from the CTS API. `value` is the canonical `<slug>.aws` form the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (6 lines × 2) packages/stack-profile/src/profile_store.rs:206— packages/stack-profile/src/profile_store.rs:206-211 | packages/stack-profile/src/profile_store.rs:496-501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/stack-profile/src/profile_store.rs:206` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:860— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:860-865 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:403-408 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) languages/golang/encrypt/client.go:272— languages/golang/encrypt/client.go:272-277 | languages/golang/internal/guest/memory.go:245-250 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Check import visibility before settling on that home: `languages/golang/internal/guest/memory.go` sits under a restricted `internal` directory, which only code inside its own subtree is permitted to import from — so it is reachable from some of these sites and not from others, and being able to see the copies is not the same as being allowed to share them. The home has to be somewhere every one of these sites is permitted to import from; if there is no such place, that restriction may be exactly why the copies are separate.
Duplicated block (6 lines × 2) languages/golang/encrypt/records.go:81— languages/golang/encrypt/records.go:81-86 | languages/golang/encrypt/records.go:442-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/golang/encrypt/records.go:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2 locations) languages/typescript/packages/cli/src/commands/decrypt/status.ts:87— languages/typescript/packages/cli/src/commands/decrypt/status.ts:87 · languages/typescript/packages/cli/src/commands/encrypt/status.ts:124 — 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 (17 lines × 2 locations) languages/typescript/packages/cli/src/commands/init/lib/install-skills.ts:194— languages/typescript/packages/cli/src/commands/init/lib/install-skills.ts:194 · languages/typescript/packages/wizard/src/lib/install-skills.ts:112 — 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 (17 lines × 2 locations) languages/typescript/packages/migrate/src/cursor.ts:204— languages/typescript/packages/migrate/src/cursor.ts:204 · languages/typescript/packages/migrate/src/cursor.ts:233 — 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 (17 lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:183— languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:183 · languages/typescript/packages/stack/src/encryption/operations/encrypt.ts:155 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
stack_encrypt_derive::decrypt::derive (cognitive 39) packages/stack-encrypt-derive/src/decrypt.rs:8— stack_encrypt_derive::decrypt::derive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 3 (7 pts), match/switch 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stack_encrypt_derive::shape::collect (cognitive 38) packages/stack-encrypt-derive/src/shape.rs:313— stack_encrypt_derive::shape::collect has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 4 (11 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stack_encrypt_derive::shape::one_output_per_plaintext_field (cognitive 17) packages/stack-encrypt-derive/src/shape.rs:246— stack_encrypt_derive::shape::one_output_per_plaintext_field has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eql_codegen::main (cognitive 38) packages/eql/crates/eql-codegen/src/main.rs:17— eql_codegen::main has cognitive complexity 38 (threshold 15). Drivers by points: loops 5 (13 pts), match/switch 5 (10 pts), if/else 8, boolean chains 7 (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.
eql_codegen::ordering::topo_order (cognitive 18) packages/eql/crates/eql-codegen/src/ordering.rs:211— eql_codegen::ordering::topo_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eql_codegen::generate::generate_all (cognitive 16) packages/eql/crates/eql-codegen/src/generate.rs:1101— eql_codegen::generate::generate_all has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (4 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) packages/stack-auth/src/error.rs:723— packages/stack-auth/src/error.rs:723-754 | packages/stack-auth/src/error.rs:771-795 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) languages/golang/auth/guest/src/status.rs:45— languages/golang/auth/guest/src/status.rs:45-70 | packages/stack-auth/src/error.rs:619-643 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) packages/eql/crates/eql-codegen/src/context.rs:139— packages/eql/crates/eql-codegen/src/context.rs:139-165 | packages/eql/crates/eql-codegen/src/context.rs:171-195 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) languages/golang/auth/transport.go:231— languages/golang/auth/transport.go:231-243 | languages/golang/encrypt/transport.go:189-201 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) packages/stack-encrypt/src/cipher.rs:1720— packages/stack-encrypt/src/cipher.rs:1720-1732 | packages/stack-encrypt/src/cipher.rs:1751-1764 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) languages/golang/encrypt/records.go:494— languages/golang/encrypt/records.go:494-506 | languages/golang/encrypt/term.go:28-40 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) packages/stack-profile/src/profile_store.rs:158— packages/stack-profile/src/profile_store.rs:158-168 | packages/stack-profile/src/profile_store.rs:175-183 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) docs/plans/2026-10-04-plan-builder/contacts/contacts.go:68— docs/plans/2026-10-04-plan-builder/contacts/contacts.go:68-76 | docs/plans/2026-10-04-plan-builder/individuals/store.go:31-40 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) languages/golang/auth/transport.go:245— languages/golang/auth/transport.go:245-253 | languages/golang/encrypt/transport.go:204-212 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:539— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:539-552 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:557-570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:539` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2240— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2240-2253 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:1037-1050 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) packages/stack-auth/src/access_key_refresher.rs:70— packages/stack-auth/src/access_key_refresher.rs:70-83 | packages/stack-auth/src/oidc_refresher.rs:189-202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/stack-auth/src/access_key_refresher.rs:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: @cipherstash/eql — @cipherstash/eql: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: eql-domains — eql-domains: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: stack-guest-abi — stack-guest-abi: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
X2 · Cancellation propagation· Async function without AbortSignal · ×3
Async function without AbortSignal: reloadSchemaCache languages/typescript/packages/stack-supabase/integration/helpers/pgrest.ts:49— `reloadSchemaCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: identify languages/typescript/packages/stack/src/identity/index.ts:254— `identify` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchCtsToken languages/typescript/packages/nextjs/src/cts/index.ts:182— `fetchCtsToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
AXS1 · Runtime exposed surface· Runtime opened a port the repository does not declare · ×2
Runtime opened a port the repository does not declare: db 55433->5432/tcp on 0.0.0.0 — The booted stack published container port 5432/tcp of service 'db' as host port 55433, but no ports:/expose:/EXPOSE entry in this repository names it — so it is most likely inherited from a base image. Observed after booting the stack in our sandbox, not read from a manifest. Advisory evidence for CRA Annex I (2)(j) (limit attack surfaces, including external interfaces); we do not assess whether the network it is published onto makes this a risk.
Runtime opened a port the repository does not declare: postgrest 55430->3000/tcp on 0.0.0.0 — The booted stack published container port 3000/tcp of service 'postgrest' as host port 55430, but no ports:/expose:/EXPOSE entry in this repository names it — so it is most likely inherited from a base image. Observed after booting the stack in our sandbox, not read from a manifest. Advisory evidence for CRA Annex I (2)(j) (limit attack surfaces, including external interfaces); we do not assess whether the network it is published onto makes this a risk.
protect_ffi::eql_v3::target_domain_for_column (cyclomatic 37) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:183— protect_ffi::eql_v3::target_domain_for_column has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
protect_ffi::to_query_plaintext (cyclomatic 24) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1271— protect_ffi::to_query_plaintext has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
rewrite-migrations.rewriteEncryptedAlterColumns (cyclomatic 20) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1051— rewrite-migrations.rewriteEncryptedAlterColumns has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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.
rewrite-migrations.rewriteEncryptedAlterColumns (cyclomatic 20) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1057— rewrite-migrations.rewriteEncryptedAlterColumns has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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.
rewrite-migrations.isInsideCommentOrString (cyclomatic 19) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:189— rewrite-migrations.isInsideCommentOrString 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.
rewrite-migrations.isInsideCommentOrString (cyclomatic 19) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:197— rewrite-migrations.isInsideCommentOrString 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.
FixmeComment packages/stack-kms/src/key.rs:82— // FIXME: This shouldn't be Clone but it is needed right now for the JSONB indexer. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment packages/stack-kms/src/key.rs:128— // FIXME: Making this Cloneable for now so that we can use the same key many times for the JSONB indexer. — 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.
protect_ffi::eql_v3::target_domain_for_column (cognitive 44) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/eql_v3.rs:183— protect_ffi::eql_v3::target_domain_for_column has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 15, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
protect_ffi::to_query_plaintext (cognitive 19) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1271— protect_ffi::to_query_plaintext has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rewrite-migrations.isInsideCommentOrString (cognitive 43) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:189— rewrite-migrations.isInsideCommentOrString has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rewrite-migrations.isInsideCommentOrString (cognitive 43) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:197— rewrite-migrations.isInsideCommentOrString has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stack_encrypt::dynamic::record::plan_with (cognitive 34) packages/stack-encrypt/src/dynamic/record.rs:1064— stack_encrypt::dynamic::record::plan_with has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 4 (8 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stack_encrypt::dynamic::record::record_row (cognitive 19) packages/stack-encrypt/src/dynamic/record.rs:2007— stack_encrypt::dynamic::record::record_row has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), 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.
rewrite-migrations.rewriteEncryptedAlterColumns (cognitive 31) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1051— rewrite-migrations.rewriteEncryptedAlterColumns has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (4 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 13). Of this number, 18 points are the body's own statements and 13 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.
rewrite-migrations.rewriteEncryptedAlterColumns (cognitive 31) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1057— rewrite-migrations.rewriteEncryptedAlterColumns has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (4 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 13). Of this number, 18 points are the body's own statements and 13 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.
rewrite-migrations.dollarQuotedBodies (cognitive 27) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:316— rewrite-migrations.dollarQuotedBodies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 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.
rewrite-migrations.dollarQuotedBodies (cognitive 27) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:324— rewrite-migrations.dollarQuotedBodies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 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.
rewrite-migrations.indexDeclarations (cognitive 18) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:693— rewrite-migrations.indexDeclarations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (7 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.
rewrite-migrations.indexDeclarations (cognitive 18) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:701— rewrite-migrations.indexDeclarations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (7 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.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) packages/stack-encrypt/src/dynamic/record.rs:1538— packages/stack-encrypt/src/dynamic/record.rs:1538-1551 | packages/stack-encrypt/src/dynamic/record.rs:1575-1593 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) languages/golang/encrypt/ciphertext.go:37— languages/golang/encrypt/ciphertext.go:37-50 | languages/golang/encrypt/eql/eql.go:87-102 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×2
Edited copy of a member (11 corresponding lines) languages/golang/encrypt/keyset.go:50— languages/golang/encrypt/keyset.go:50-60 | languages/golang/internal/guest/diagnostic.go:130-140 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) packages/stack-encrypt/src/dynamic/mod.rs:362— packages/stack-encrypt/src/dynamic/mod.rs:362-372 | packages/stack-encrypt/src/dynamic/mod.rs:375-387 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) languages/golang/auth/transport.go:199— languages/golang/auth/transport.go:199-215 | languages/golang/encrypt/transport.go:255-273 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) packages/eql/crates/eql-codegen/src/generate.rs:88— packages/eql/crates/eql-codegen/src/generate.rs:88-107 | packages/eql/crates/eql-codegen/src/generate.rs:113-129 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) languages/typescript/packages/auth/src/lib.rs:377— languages/typescript/packages/auth/src/lib.rs:377-390 | languages/typescript/packages/auth/src/lib.rs:413-433 | languages/typescript/packages/stack-auth-wasm/src/lib.rs:407-420 | languages/typescript/packages/stack-auth-wasm/src/lib.rs:442-462 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) languages/golang/encrypt/guest/src/abi.rs:362— languages/golang/encrypt/guest/src/abi.rs:362-375 | languages/golang/encrypt/guest/src/abi.rs:395-408 | languages/golang/encrypt/guest/src/abi.rs:434-447 | languages/golang/encrypt/guest/src/abi.rs:488-502 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) packages/stack-encrypt/src/cipher.rs:482— packages/stack-encrypt/src/cipher.rs:482-488 | packages/stack-encrypt/src/keyset.rs:571-577 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) languages/golang/encrypt/transport.go:66— languages/golang/encrypt/transport.go:66-75 | languages/golang/auth/transport.go:103-109 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:743— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:743-754 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:881-892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:743` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `opts` to `EncryptOptions` in one and `EncryptQueryOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) packages/eql/crates/eql-codegen/src/writer.rs:76— packages/eql/crates/eql-codegen/src/writer.rs:76-87 | packages/eql/crates/eql-codegen/src/writer.rs:125-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/eql/crates/eql-codegen/src/writer.rs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/eql/crates/eql-codegen/src/writer.rs:137` calls `contains`, `normalize` and `packages/eql/crates/eql-codegen/src/writer.rs:88` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) packages/stack-auth/src/auto_strategy.rs:118— packages/stack-auth/src/auto_strategy.rs:118-127 | packages/stack-auth/src/auto_strategy.rs:159-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) languages/golang/auth/store.go:244— languages/golang/auth/store.go:244-254 | languages/golang/encrypt/client.go:419-428 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `languages/golang/auth/store.go:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1856— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1856-1864 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2028-2036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1856` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) languages/golang/encrypt/gensupport/gensupport.go:125— languages/golang/encrypt/gensupport/gensupport.go:125-133 | languages/golang/stashgen/read.go:898-906 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `text` in one and `name` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
IC1 · Incompleteness & stubs· Empty method body · ×2
Empty method body — does nothing with its inputs languages/typescript/packages/auth/src/lib.rs:38— `warn_callback` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs packages/eql/crates/eql-codegen/src/go_eql.rs:84— `methods` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
R10 · Code Duplication· Duplicated block with local edits (59 matched lines × 2 locations) · ×2
Duplicated block with local edits (59 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/status/render.ts:28— languages/typescript/packages/cli/src/commands/status/render.ts:28 · languages/typescript/packages/cli/src/commands/status/render.ts:131 — the two spans are one implementation copied and then locally edited — 295 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 with local edits (59 matched lines × 2 locations) languages/typescript/packages/stack/src/utils/config/index.ts:11— languages/typescript/packages/stack/src/utils/config/index.ts:11 · languages/typescript/packages/utils/config/index.ts:11 — the two spans are one implementation copied and then locally edited — 307 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 (24 lines × 2 locations) languages/typescript/packages/stack/src/dynamodb/helpers.ts:108— languages/typescript/packages/stack/src/dynamodb/helpers.ts:108 · languages/typescript/packages/stack/src/dynamodb/helpers.ts:178 — 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) languages/typescript/packages/stack/src/dynamodb/helpers.ts:413— languages/typescript/packages/stack/src/dynamodb/helpers.ts:413 · languages/typescript/packages/stack/src/dynamodb/helpers.ts:609 — 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) languages/typescript/packages/stack-drizzle/src/operators.ts:570— languages/typescript/packages/stack-drizzle/src/operators.ts:570 · languages/typescript/packages/stack-drizzle/src/operators.ts:774 — 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) languages/typescript/packages/stack/src/encryption/index.ts:911— languages/typescript/packages/stack/src/encryption/index.ts:911 · languages/typescript/packages/stack/src/wasm-inline.ts:1659 — 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.
Complex function isInsideCommentOrString (cyclomatic 19, cognitive 43) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:189— isInsideCommentOrString has cyclomatic complexity 19 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 isInsideCommentOrString (cyclomatic 19, cognitive 43) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:197— isInsideCommentOrString has cyclomatic complexity 19 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.
Dead file (~174 LoC) languages/typescript/packages/wizard/src/lib/analytics.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/wizard/src/run.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~174 LoC) REDACTED— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/wizard/src/run.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
AXI1 · Runtime container hardening· Container process runs as root · ×1
Container process runs as root: cs-integration-supabase-db-1 — 'cs-integration-supabase-db-1' (supabase/postgres:17.4.1.048@sha256:68f90b9a227f56b583d2c1aef2fc683c4dc693a3c5ebf5191903e966318d87ee) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
AXR1 · Runtime accessibility (rendered)· WCAG 2.4.2 reproducibly failed in a rendered surface · ×1
WCAG 2.4.2 reproducibly failed in a rendered surface — axe-core rule(s) document-title failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered)· WCAG 3.1.1 reproducibly failed in a rendered surface · ×1
WCAG 3.1.1 reproducibly failed in a rendered surface — axe-core rule(s) html-has-lang failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
query-filters.applyFilters (cyclomatic 51) languages/typescript/packages/stack-supabase/src/query-filters.ts:136— query-filters.applyFilters has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 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.
gensupport.convert (cyclomatic 47) languages/golang/encrypt/gensupport/convert.go:29— gensupport.convert has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case's concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases — they stay explicit and reviewable.
xml-to-markdown.process_function (cyclomatic 46) packages/eql/tasks/docs/generate/xml-to-markdown.py:229— xml-to-markdown.process_function has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
interface.initializeAgent.run (cyclomatic 46) languages/typescript/packages/wizard/src/agent/interface.ts:299— interface.initializeAgent.run has cyclomatic complexity 46 (threshold 15). Of this number, 39 points are the body's own statements and 7 belong to 2 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.
stashgen.parseTagValue (cyclomatic 45) languages/golang/stashgen/tag.go:56— stashgen.parseTagValue has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reader.collectFields (cyclomatic 42) languages/golang/stashgen/read.go:365— reader.collectFields has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reader.build (cyclomatic 35) languages/golang/stashgen/read.go:222— reader.build 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.
backfill.decryptBackfillCommand (cyclomatic 35) languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111— backfill.decryptBackfillCommand has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 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.
query-terms.collectQueryTerms (cyclomatic 34) languages/typescript/packages/stack-supabase/src/query-terms.ts:112— query-terms.collectQueryTerms has cyclomatic complexity 34 (threshold 15). Of this number, 32 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.
create.construct (cyclomatic 34) languages/typescript/packages/stack-supabase/src/create.ts:218— create.construct has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.initCommand (cyclomatic 32) languages/typescript/packages/cli/src/commands/init/index.ts:114— index.initCommand has cyclomatic complexity 32 (threshold 15). Of this number, 31 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.
reader.readModel (cyclomatic 31) languages/golang/stashgen/model.go:38— reader.readModel has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
backfill.buildPlaintextCoercer (cyclomatic 31) languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:436— backfill.buildPlaintextCoercer has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 440, 455, 463, …). 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.
derived-search-index-restoration.inspectReinstallDependencies (cyclomatic 31) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:494— derived-search-index-restoration.inspectReinstallDependencies has cyclomatic complexity 31 (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.
validate.validateSchemas (cyclomatic 30) REDACTED:242— validate.validateSchemas has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
encrypt.NewClient (cyclomatic 28) languages/golang/encrypt/client.go:68— encrypt.NewClient has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Plan.Validate (cyclomatic 28) languages/golang/internal/record/record.go:203— Plan.Validate 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.
migration.generateDrizzleEqlMigration (cyclomatic 28) languages/typescript/packages/cli/src/commands/eql/migration.ts:386— migration.generateDrizzleEqlMigration 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.
eql_codegen::main (cyclomatic 27) packages/eql/crates/eql-codegen/src/main.rs:17— eql_codegen::main has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
reader.buildFields (cyclomatic 27) languages/golang/stashgen/read.go:641— reader.buildFields 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.
Client.open (cyclomatic 25) languages/golang/encrypt/records.go:385— Client.open 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.
install.installCommand (cyclomatic 25) languages/typescript/packages/cli/src/commands/db/install.ts:101— install.installCommand 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.
status.statusCommand (cyclomatic 25) languages/typescript/packages/cli/src/commands/db/status.ts:8— status.statusCommand 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.
index.implCommand (cyclomatic 25) languages/typescript/packages/cli/src/commands/impl/index.ts:146— index.implCommand 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.
encrypt.parseTarget (cyclomatic 24) languages/golang/encrypt/checker.go:112— encrypt.parseTarget 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.
stashgen.generateFor (cyclomatic 24) languages/golang/stashgen/policy.go:98— stashgen.generateFor 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.
derived-search-index-restoration.rebuildIndexes (cyclomatic 24) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:571— derived-search-index-restoration.rebuildIndexes has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
verify.diffSurface (cyclomatic 24) languages/typescript/packages/cli/src/installer/verify.ts:719— verify.diffSurface 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.
helpers.splitTopLevel (cyclomatic 24) languages/typescript/packages/stack-supabase/src/helpers.ts:402— helpers.splitTopLevel has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
runtime-versions.compareVersions (cyclomatic 23) languages/typescript/packages/cli/src/runtime-versions.ts:121— runtime-versions.compareVersions 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.
plan.decryptPlanCommand (cyclomatic 23) languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81— plan.decryptPlanCommand 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
installation-state.assessEqlInstallation (cyclomatic 23) languages/typescript/packages/cli/src/installer/installation-state.ts:78— installation-state.assessEqlInstallation has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ContainerAttrs::parse (cyclomatic 22) packages/stack-encrypt-derive/src/attrs.rs:42— ContainerAttrs::parse 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.
preflight.renderPreflightReport (cyclomatic 22) languages/typescript/packages/cli/src/commands/db/preflight.ts:106— preflight.renderPreflightReport has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
context.loadEncryptionContext (cyclomatic 22) languages/typescript/packages/cli/src/commands/encrypt/context.ts:48— context.loadEncryptionContext 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.
stack_encrypt::dynamic::record::plan_with (cyclomatic 21) packages/stack-encrypt/src/dynamic/record.rs:1064— stack_encrypt::dynamic::record::plan_with has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
encrypt.sealedOf (cyclomatic 21) languages/golang/encrypt/records.go:285— encrypt.sealedOf has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gensupport.convertVia (cyclomatic 21) languages/golang/encrypt/gensupport/convert.go:152— gensupport.convertVia has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
backfill.backfillCommand (cyclomatic 21) languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:113— backfill.backfillCommand has cyclomatic complexity 21 (threshold 15). Of this number, 19 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.
operators-v3.coerceV3 (cyclomatic 21) languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:303— operators-v3.coerceV3 has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run.run (cyclomatic 21) languages/typescript/packages/wizard/src/run.ts:40— run.run has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
Descriptor::render (cyclomatic 20) packages/stack-encrypt/src/descriptor.rs:178— Descriptor::render has cyclomatic complexity 20 (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.
stashgen.lowerDeclaration (cyclomatic 20) languages/golang/stashgen/engine.go:119— stashgen.lowerDeclaration 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.
adapter.makeWasmAdapter.run (cyclomatic 20) languages/typescript/packages/stack/integration/wasm/adapter.ts:280— adapter.makeWasmAdapter.run has cyclomatic complexity 20 (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.
xml-to-markdown.generate_markdown (cyclomatic 19) packages/eql/tasks/docs/generate/xml-to-markdown.py:587— xml-to-markdown.generate_markdown 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.
xml-to-markdown.main (cyclomatic 19) packages/eql/tasks/docs/generate/xml-to-markdown.py:683— xml-to-markdown.main 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.
index.planCommand (cyclomatic 19) languages/typescript/packages/cli/src/commands/plan/index.ts:197— index.planCommand 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.
decrypt.runDecryptBackfill (cyclomatic 19) languages/typescript/packages/migrate/src/decrypt.ts:266— decrypt.runDecryptBackfill has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 321, 302, 345). 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.
helpers.toItemWithEqlPayloads::processValue (cyclomatic 19) languages/typescript/packages/stack/src/dynamodb/helpers.ts:518— helpers.toItemWithEqlPayloads::processValue 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.
stack_encrypt_derive::shape::collect (cyclomatic 18) packages/stack-encrypt-derive/src/shape.rs:313— stack_encrypt_derive::shape::collect 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.
migration.generateSupabaseEqlMigration (cyclomatic 18) languages/typescript/packages/cli/src/commands/eql/migration.ts:242— migration.generateSupabaseEqlMigration 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.
protosource.GoName (cyclomatic 17) languages/golang/encrypt/policy/protosource/protosource.go:95— protosource.GoName has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
stashgen.classify (cyclomatic 17) languages/golang/stashgen/read.go:766— stashgen.classify has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
stashgen.notJSONEncodable (cyclomatic 17) languages/golang/stashgen/read.go:924— stashgen.notJSONEncodable 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.
writer.declaration (cyclomatic 17) languages/golang/stashgen/emit.go:251— writer.declaration 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.
quest.computeDoneMigrate (cyclomatic 17) languages/typescript/packages/cli/src/commands/status/quest.ts:214— quest.computeDoneMigrate has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
status.renderRow (cyclomatic 17) languages/typescript/packages/cli/src/commands/encrypt/status.ts:143— status.renderRow 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.
Cipher.Seal (cyclomatic 16) languages/golang/encrypt/records.go:33— Cipher.Seal 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.
database-url.resolveDatabaseUrl (cyclomatic 16) languages/typescript/packages/cli/src/config/database-url.ts:206— database-url.resolveDatabaseUrl 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.
index.mintCredentials (cyclomatic 16) languages/typescript/packages/cli/src/commands/env/index.ts:341— index.mintCredentials has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
index.doctorCommand (cyclomatic 16) languages/typescript/packages/cli/src/commands/doctor/index.ts:75— index.doctorCommand 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.
column-migration.deriveColumnMigration (cyclomatic 16) languages/typescript/packages/migrate/src/column-migration.ts:162— column-migration.deriveColumnMigration 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.
interface.wizardCanUseTool (cyclomatic 16) languages/typescript/packages/wizard/src/agent/interface.ts:146— interface.wizardCanUseTool 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.
interface.initializeAgent.run (cognitive 105) languages/typescript/packages/wizard/src/agent/interface.ts:299— interface.initializeAgent.run has cognitive complexity 105 (threshold 15). Drivers by points: if/else 28 (81 pts), boolean chains 9, loops 4 (8 pts), ternaries 3 (5 pts), error handling 2 (nesting depth added 59). Of this number, 95 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
xml-to-markdown.process_function (cognitive 82) packages/eql/tasks/docs/generate/xml-to-markdown.py:229— xml-to-markdown.process_function has cognitive complexity 82 (threshold 15). Drivers by points: if/else 26 (54 pts), ternaries 9 (16 pts), boolean chains 10, loops 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
query-terms.collectQueryTerms (cognitive 67) languages/typescript/packages/stack-supabase/src/query-terms.ts:112— query-terms.collectQueryTerms has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (53 pts), loops 8 (10 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 33). Of this number, 64 points are the body's own statements and 3 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.
query-filters.applyFilters (cognitive 65) languages/typescript/packages/stack-supabase/src/query-filters.ts:136— query-filters.applyFilters has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 5 (13 pts), loops 8 (11 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 29). Of this number, 56 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.
reader.buildFields (cognitive 63) languages/golang/stashgen/read.go:641— reader.buildFields has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (51 pts), loops 4 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reader.collectFields (cognitive 56) languages/golang/stashgen/read.go:365— reader.collectFields has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 4 (11 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate.validateSchemas (cognitive 50) REDACTED:242— validate.validateSchemas has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 7, ternaries 3 (7 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Plan.Validate (cognitive 48) languages/golang/internal/record/record.go:203— Plan.Validate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 4 (5 pts), match/switch 2 (4 pts), boolean chains 2 (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.
create.construct (cognitive 48) languages/typescript/packages/stack-supabase/src/create.ts:218— create.construct has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 8 (12 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reader.readModel (cognitive 47) languages/golang/stashgen/model.go:38— reader.readModel has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (39 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.implCommand (cognitive 47) languages/typescript/packages/cli/src/commands/impl/index.ts:146— index.implCommand has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 4, loops 1 (4 pts), error handling 1, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
encrypt.sealedOf (cognitive 46) languages/golang/encrypt/records.go:285— encrypt.sealedOf has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContainerAttrs::parse (cognitive 43) packages/stack-encrypt-derive/src/attrs.rs:42— ContainerAttrs::parse has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (38 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stashgen.lowerDeclaration (cognitive 43) languages/golang/stashgen/engine.go:119— stashgen.lowerDeclaration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
migration.generateDrizzleEqlMigration (cognitive 43) languages/typescript/packages/cli/src/commands/eql/migration.ts:386— migration.generateDrizzleEqlMigration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 7 (15 pts), error handling 4 (5 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.open (cognitive 42) languages/golang/encrypt/records.go:385— Client.open has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stashgen.parseTagValue (cognitive 42) languages/golang/stashgen/tag.go:56— stashgen.parseTagValue has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 10, match/switch 2 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
status.statusCommand (cognitive 42) languages/typescript/packages/cli/src/commands/db/status.ts:8— status.statusCommand has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 6 (14 pts), error handling 3, boolean chains 2, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backfill.decryptBackfillCommand (cognitive 41) languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111— backfill.decryptBackfillCommand has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 8, ternaries 4 (8 pts), error handling 3 (nesting depth added 9). Of this number, 37 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.initCommand (cognitive 40) languages/typescript/packages/cli/src/commands/init/index.ts:114— index.initCommand has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (20 pts), ternaries 5 (11 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 8). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reader.build (cognitive 38) languages/golang/stashgen/read.go:222— reader.build has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 5, loops 3 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run.run (cognitive 38) languages/typescript/packages/wizard/src/run.ts:40— run.run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (22 pts), ternaries 7 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 12). Of this number, 35 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.
runtime-versions.compareVersions (cognitive 37) languages/typescript/packages/cli/src/runtime-versions.ts:121— runtime-versions.compareVersions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 5 (14 pts), boolean chains 3, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
verify.diffSurface (cognitive 35) languages/typescript/packages/cli/src/installer/verify.ts:719— verify.diffSurface has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 6 (8 pts), ternaries 4 (6 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.
FieldAttrs::parse (cognitive 34) packages/stack-encrypt-derive/src/attrs.rs:229— FieldAttrs::parse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xml-to-markdown.convert_variants_to_links (cognitive 34) packages/eql/tasks/docs/generate/xml-to-markdown.py:518— xml-to-markdown.convert_variants_to_links has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 2 (7 pts), loops 2, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gensupport.convertVia (cognitive 34) languages/golang/encrypt/gensupport/convert.go:152— gensupport.convertVia has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
context.loadEncryptionContext (cognitive 34) languages/typescript/packages/cli/src/commands/encrypt/context.ts:48— context.loadEncryptionContext has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 3 (7 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xml-to-markdown.extract_description (cognitive 32) packages/eql/tasks/docs/generate/xml-to-markdown.py:164— xml-to-markdown.extract_description has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xml-to-markdown.generate_markdown (cognitive 32) packages/eql/tasks/docs/generate/xml-to-markdown.py:587— xml-to-markdown.generate_markdown has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
encrypt.parseTarget (cognitive 32) languages/golang/encrypt/checker.go:112— encrypt.parseTarget has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (6 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Static.Check (cognitive 32) languages/golang/stashgen/enginetest/enginetest.go:30— Static.Check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
install.installCommand (cognitive 32) languages/typescript/packages/cli/src/commands/db/install.ts:101— install.installCommand has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 3 (5 pts), boolean chains 4, error handling 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stashgen.generateFor (cognitive 31) languages/golang/stashgen/policy.go:98— stashgen.generateFor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 3, 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.
encrypt.NewClient (cognitive 30) languages/golang/encrypt/client.go:68— encrypt.NewClient has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 5, loops 2 (nesting depth added 5). Of this number, 28 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.
backfill.buildPlaintextCoercer (cognitive 30) languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:436— backfill.buildPlaintextCoercer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, ternaries 1 (2 pts), match/switch 1 (nesting depth added 11). None of this is in the body itself: all 30 points belong to 5 function literals inside it that branch (lines 455, 463, 470, …). 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.
index.doctorCommand (cognitive 29) languages/typescript/packages/cli/src/commands/doctor/index.ts:75— index.doctorCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 5 (11 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gensupport.convert (cognitive 28) languages/golang/encrypt/gensupport/convert.go:29— gensupport.convert has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plan.renderOverview (cognitive 28) languages/typescript/packages/cli/src/commands/decrypt/plan.ts:347— plan.renderOverview has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plan.decryptPlanCommand (cognitive 27) languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81— plan.decryptPlanCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 4, ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 5). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backfill.backfillCommand (cognitive 26) languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:113— backfill.backfillCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, error handling 3, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 24 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.
operators-v3.coerceV3 (cognitive 26) languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:303— operators-v3.coerceV3 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (3 pts), match/switch 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.
xml-to-markdown.main (cognitive 25) packages/eql/tasks/docs/generate/xml-to-markdown.py:683— xml-to-markdown.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 6 (9 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 7). 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.
database-url.resolveDatabaseUrl (cognitive 25) languages/typescript/packages/cli/src/config/database-url.ts:206— database-url.resolveDatabaseUrl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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.
format.formatAgentOutput (cognitive 25) languages/typescript/packages/wizard/src/lib/format.ts:16— format.formatAgentOutput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.planCommand (cognitive 24) languages/typescript/packages/cli/src/commands/plan/index.ts:197— index.planCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
installation-state.assessEqlInstallation (cognitive 24) languages/typescript/packages/cli/src/installer/installation-state.ts:78— installation-state.assessEqlInstallation has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 4 (5 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
infer-index-type.resolveIndexType (cognitive 24) languages/typescript/packages/stack/src/encryption/helpers/infer-index-type.ts:125— infer-index-type.resolveIndexType has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parse-args.parseArgs (cognitive 24) languages/typescript/packages/wizard/src/bin/parse-args.ts:17— parse-args.parseArgs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writer.declaration (cognitive 23) languages/golang/stashgen/emit.go:251— writer.declaration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
migration.generateSupabaseEqlMigration (cognitive 23) languages/typescript/packages/cli/src/commands/eql/migration.ts:242— migration.generateSupabaseEqlMigration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), error handling 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
helpers.toItemWithEqlPayloads::processValue (cognitive 23) languages/typescript/packages/stack/src/dynamodb/helpers.ts:518— helpers.toItemWithEqlPayloads::processValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 3 (6 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.
xml-to-markdown.extract_parameter_list (cognitive 22) packages/eql/tasks/docs/generate/xml-to-markdown.py:93— xml-to-markdown.extract_parameter_list has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stashgen.checkNamesFree (cognitive 22) languages/golang/stashgen/generate.go:116— stashgen.checkNamesFree has cognitive complexity 22 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (6 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 12). Of this number, 20 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.
preflight.renderPreflightReport (cognitive 22) languages/typescript/packages/cli/src/commands/db/preflight.ts:106— preflight.renderPreflightReport has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 6, if/else 1 (nesting depth added 3). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
derived-search-index-restoration.rebuildIndexes (cognitive 22) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:571— derived-search-index-restoration.rebuildIndexes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 7). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
column-migration.deriveColumnMigration (cognitive 22) languages/typescript/packages/migrate/src/column-migration.ts:162— column-migration.deriveColumnMigration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, boolean chains 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.
NeonJsAuthStrategy::get_token (cognitive 21) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:688— NeonJsAuthStrategy::get_token has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 9 (15 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
decrypt.runDecryptBackfill (cognitive 21) languages/typescript/packages/migrate/src/decrypt.ts:266— decrypt.runDecryptBackfill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3, boolean chains 2, loops 2 (nesting depth added 5). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 321, 302, 345). 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.
Cipher.Seal (cognitive 20) languages/golang/encrypt/records.go:33— Cipher.Seal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Codec.Encrypt (cognitive 20) languages/golang/encrypt/gensupport/codec.go:91— Codec.Encrypt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Codec.Decrypt (cognitive 20) languages/golang/encrypt/gensupport/codec.go:138— Codec.Decrypt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (8 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reader.checkDirectives (cognitive 20) languages/golang/stashgen/read.go:818— reader.checkDirectives has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
interface.wizardCanUseTool (cognitive 20) languages/typescript/packages/wizard/src/agent/interface.ts:146— interface.wizardCanUseTool has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writer.fieldEntries (cognitive 19) languages/golang/stashgen/emit.go:510— writer.fieldEntries has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 8). 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.
verify.verifyDeclaredSchemas (cognitive 19) languages/typescript/packages/stack-supabase/src/verify.ts:13— verify.verifyDeclaredSchemas has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (8 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.
post-agent.runPostAgentSteps (cognitive 19) languages/typescript/packages/wizard/src/lib/post-agent.ts:37— post-agent.runPostAgentSteps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 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.
post-agent.rewriteEncryptedMigrations (cognitive 19) languages/typescript/packages/wizard/src/lib/post-agent.ts:157— post-agent.rewriteEncryptedMigrations has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stashgen.notJSONEncodable (cognitive 18) languages/golang/stashgen/read.go:924— stashgen.notJSONEncodable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writer.value (cognitive 18) languages/golang/stashgen/emit.go:435— writer.value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
preflight.preflightCommand (cognitive 18) languages/typescript/packages/cli/src/commands/db/preflight.ts:31— preflight.preflightCommand has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.mintCredentials (cognitive 18) languages/typescript/packages/cli/src/commands/env/index.ts:341— index.mintCredentials has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
validate.reportIssues (cognitive 18) REDACTED:791— validate.reportIssues has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4, match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
introspect.selectTableColumns (cognitive 18) languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:233— introspect.selectTableColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (7 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bulk-encrypt-v3.collectV3Targets (cognitive 18) languages/typescript/packages/stack-prisma/src/v3/bulk-encrypt-v3.ts:158— bulk-encrypt-v3.collectV3Targets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helpers.splitTopLevel (cognitive 18) languages/typescript/packages/stack-supabase/src/helpers.ts:402— helpers.splitTopLevel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, loops 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.
RefreshState::get_token (cognitive 17) packages/stack-auth/src/auto_refresh.rs:292— RefreshState::get_token has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Codec.split (cognitive 17) languages/golang/encrypt/gensupport/codec.go:194— Codec.split has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 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.
env-keys.readEnvKeyNames (cognitive 17) languages/typescript/packages/cli/src/commands/init/lib/env-keys.ts:12— env-keys.readEnvKeyNames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.parseArgs (cognitive 17) languages/typescript/packages/cli/src/bin/main.ts:160— main.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
indexes.encryptedIndexes (cognitive 17) languages/typescript/packages/stack-drizzle/src/indexes.ts:56— indexes.encryptedIndexes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sdk-adapter-v3.createCipherstashV3Sdk.bulkEncrypt (cognitive 17) languages/typescript/packages/stack-prisma/src/v3/sdk-adapter-v3.ts:148— sdk-adapter-v3.createCipherstashV3Sdk.bulkEncrypt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 161, 230, 246). 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.
encrypt.sourceRow (cognitive 16) languages/golang/encrypt/records.go:251— encrypt.sourceRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 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.
stashgen.stripTagKey (cognitive 16) languages/golang/stashgen/read.go:865— stashgen.stripTagKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db-readers.fetchActiveEqlConfig (cognitive 16) languages/typescript/packages/cli/src/commands/encrypt/lib/db-readers.ts:76— db-readers.fetchActiveEqlConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plan.planCommand (cognitive 16) languages/typescript/packages/cli/src/commands/encrypt/plan.ts:15— plan.planCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
introspect.buildSchemasFromDatabase (cognitive 16) languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:320— introspect.buildSchemasFromDatabase has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
selector-path.unsupportedLeafReason (cognitive 16) languages/typescript/packages/stack/src/eql/v3/selector-path.ts:83— selector-path.unsupportedLeafReason has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helpers.toEncryptedDynamoItem (cognitive 16) languages/typescript/packages/stack/src/dynamodb/helpers.ts:357— helpers.toEncryptedDynamoItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 16 points belong to 2 function items inside it that branch (processValue, a function literal at line 429). 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.
rewrite-migrations.sweepMigrationDirs (cognitive 16) languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1295— rewrite-migrations.sweepMigrationDirs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency· `stashgen.ParseModelFlag` takes no context.Context; its 3 sibling operations take one · ×1
`stashgen.ParseModelFlag` takes no context.Context; its 3 sibling operations take one languages/golang/stashgen/model.go:22— 3 of 4 fallible operations of `package stashgen` take a `ctx context.Context` (3 of 4). Siblings: stashgen.GuestEngine (languages/golang/stashgen/engine.go:49); stashgen.FromTags (languages/golang/stashgen/generate.go:65); stashgen.Generate (languages/golang/stashgen/policy.go:51). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
TooManyMethods: EncryptedQueryBuilderImpl languages/typescript/packages/stack-supabase/src/query-builder.ts:92— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: ContainerAttrs.parse packages/stack-encrypt-derive/src/attrs.rs:42— MethodTooLong — parse runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: EncryptedQueryBuilderImpl languages/typescript/packages/stack-supabase/src/query-builder.ts:92— ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Near-duplicate member family (4 members, 31 shared lines) · ×1
Near-duplicate member family (4 members, 31 shared lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1759— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1759-1865 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1955-2037 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:772-866 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:903-977 — These 4 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member pair (46 shared lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2225— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2225-2282 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:1021-1079 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) packages/stack-encrypt/src/dynamic/record.rs:1264— packages/stack-encrypt/src/dynamic/record.rs:1264-1312 | packages/stack-encrypt/src/dynamic/record.rs:1445-1508 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1693— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1693-1741 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:727-767 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) packages/eql/crates/eql-codegen/src/generate.rs:307— packages/eql/crates/eql-codegen/src/generate.rs:307-403 | packages/eql/crates/eql-codegen/src/generate.rs:416-457 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) packages/stack-encrypt/src/cipher.rs:1258— packages/stack-encrypt/src/cipher.rs:1258-1288 | packages/stack-encrypt/src/cipher.rs:1398-1442 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1901— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1901-1932 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:871-898 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) packages/stack-auth/src/access_key_refresher.rs:51— packages/stack-auth/src/access_key_refresher.rs:51-83 | packages/stack-auth/src/oidc_refresher.rs:171-202 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) packages/stack-kms/src/client.rs:228— packages/stack-kms/src/client.rs:228-256 | packages/stack-kms/src/client.rs:267-303 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) packages/eql/crates/eql-codegen/src/writer.rs:75— packages/eql/crates/eql-codegen/src/writer.rs:75-94 | packages/eql/crates/eql-codegen/src/writer.rs:124-146 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2145— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2145-2170 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:995-1016 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) languages/typescript/packages/auth/src/lib.rs:73— languages/typescript/packages/auth/src/lib.rs:73-91 | languages/typescript/packages/stack-auth-wasm/src/lib.rs:89-114 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) packages/stack-encrypt/src/dynamic/record.rs:1769— packages/stack-encrypt/src/dynamic/record.rs:1769-1783 | packages/stack-encrypt/src/dynamic/record.rs:1991-2005 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2103— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2103-2120 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:979-990 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) languages/golang/encrypt/gensupport/convert.go:300— languages/golang/encrypt/gensupport/convert.go:300-322 | languages/golang/encrypt/gensupport/convert.go:326-351 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) docs/plans/2026-10-04-plan-builder/contacts/contacts.go:41— docs/plans/2026-10-04-plan-builder/contacts/contacts.go:41-57 | docs/plans/2026-10-04-plan-builder/individuals/store.go:14-29 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) packages/eql/crates/eql-bindings/src/encryption/targets.rs:231— packages/eql/crates/eql-bindings/src/encryption/targets.rs:231-236 | packages/stack-encrypt/src/dynamic/mod.rs:130-135 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) languages/golang/auth/guest/src/headers.rs:31— languages/golang/auth/guest/src/headers.rs:31-34 | languages/golang/encrypt/guest/src/headers.rs:33-36 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (71–77 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1775— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1775-1851 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:787-857 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `Client` in one and `&WasmClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (58–60 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1965— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1965-2024 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:911-968 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1965` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `Client` in one and `&WasmClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (27 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2256— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2256-2282 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:1053-1079 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–20 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1701— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1701-1720 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:733-749 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–19 lines × 4) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1694— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1694-1712 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1789-1806 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:728-742 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:799-813 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `Client` in one and `&WasmClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1808` calls `push` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1714` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15–17 lines × 4) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1812— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1812-1826 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1995-2011 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:818-832 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:940-955 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1812` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `opts` to `EncryptBulkOptions` in one and `EncryptQueryBulkOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16–17 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1902— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1902-1918 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:872-887 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `Client` in one and `&WasmClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14–16 lines × 2) packages/eql/crates/eql-codegen/src/context.rs:145— packages/eql/crates/eql-codegen/src/context.rs:145-160 | packages/eql/crates/eql-codegen/src/context.rs:178-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/eql/crates/eql-codegen/src/context.rs:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1714— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1714-1726 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1912-1924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1714` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `opts` to `EncryptOptions` in one and `EncryptQueryOptions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–13 lines × 2) packages/stack-auth/src/error.rs:737— packages/stack-auth/src/error.rs:737-749 | packages/stack-auth/src/error.rs:777-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 4) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1765— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1765-1774 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1960-1968 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:778-786 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:906-914 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1765` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1778— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1778-1785 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1971-1977 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:789-795 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:917-923 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:1778` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2234— languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2234-2238 | languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs:1031-1035 — before extracting anything, compare `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs` and `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/wasm.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:2234` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 3) packages/stack-auth/src/access_key_refresher.rs:62— packages/stack-auth/src/access_key_refresher.rs:62-69 | packages/stack-auth/src/oidc_refresher.rs:181-188 | packages/stack-auth/src/token.rs:317-332 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/stack-auth/src/access_key_refresher.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) languages/golang/encrypt/records.go:53— languages/golang/encrypt/records.go:53-67 | languages/golang/encrypt/records.go:191-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) languages/golang/auth/transport.go:200— languages/golang/auth/transport.go:200-210 | languages/golang/encrypt/transport.go:256-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `languages/golang/auth/transport.go:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the vitest suite in languages/typescript/packages/protect-ffi/integration-tests/ ran and not one test passed (JSON report written to /tmp/codehealth-noderel-484e01d2951048628cddc943adfaa5a8/run0-10.json), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
Forked directory tree (104 identical files, ~1231 lines × 2 trees) packages/eql/crates/eql-bindings/bindings/v3/SteVecDocument.ts:1— packages/eql/crates/eql-bindings/bindings/v3/ and packages/eql/packages/eql/src/generated/v3/ are near-verbatim copies of each other: 104 files are byte-identical under the same relative paths (~1231 lines; the trees hold 104 and 105 files). That is one structural fact, not 104 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
Duplication concentrated across 9 sibling directories (17 clone groups) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1— 17 duplicated blocks under languages/typescript/packages/ have copies in at least two of the sibling directories cli, nextjs, protect-ffi, stack, stack-drizzle, stack-prisma (+3 more sibling(s) not listed) — 9 of them are reported below, and 8 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 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 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 17 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 7 sibling directories (7 clone groups) languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122— 7 duplicated blocks under languages/typescript/packages/cli/src/commands/ have copies in at least two of the sibling directories db, decrypt, encrypt, eql, impl, init (+1 more sibling(s) not listed) — 6 of them are reported below, and 1 is 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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.
Wholesale file copy (355 identical lines × 2 files) languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1— languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1 · languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:2 — these 2 files are line-for-line copies of one another — 355 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (124 matched lines × 2 locations) · ×1
Duplicated block with local edits (124 matched lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt.ts:40— languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt.ts:40 · languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt.ts:65 — the two spans are one implementation copied and then locally edited — 695 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 (116 matched lines × 2 locations) · ×1
Duplicated block with local edits (116 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122— languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:122 · languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:118 — the two spans are one implementation copied and then locally edited — 562 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 (91 matched lines × 2 locations) · ×1
Duplicated block with local edits (91 matched lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt-models.ts:27— languages/typescript/packages/stack/src/encryption/operations/bulk-encrypt-models.ts:27 · languages/typescript/packages/stack/src/encryption/operations/encrypt-model.ts:27 — the two spans are one implementation copied and then locally edited — 404 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 (69 matched lines × 2 locations) · ×1
Duplicated block with local edits (69 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/decrypt/drop.ts:77— languages/typescript/packages/cli/src/commands/decrypt/drop.ts:77 · languages/typescript/packages/cli/src/commands/encrypt/drop.ts:58 — the two spans are one implementation copied and then locally edited — 330 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 (54 matched lines × 2 locations) · ×1
Duplicated block with local edits (54 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/impl/steps/handoff-claude.ts:21— languages/typescript/packages/cli/src/commands/impl/steps/handoff-claude.ts:21 · languages/typescript/packages/cli/src/commands/impl/steps/handoff-codex.ts:46 — the two spans are one implementation copied and then locally edited — 299 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (53 lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:47— languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:47 · languages/typescript/packages/stack/src/encryption/operations/encrypt-query.ts:133 — 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 (52 matched lines × 2 locations) · ×1
Duplicated block with local edits (52 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/impl/index.ts:30— languages/typescript/packages/cli/src/commands/impl/index.ts:30 · languages/typescript/packages/cli/src/commands/plan/index.ts:57 — the two spans are one implementation copied and then locally edited — 296 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 (44 matched lines × 2 locations) · ×1
Duplicated block with local edits (44 matched lines × 2 locations) languages/typescript/packages/nextjs/src/cts/index.ts:17— languages/typescript/packages/nextjs/src/cts/index.ts:17 · languages/typescript/packages/stack/src/identity/index.ts:11 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (41 lines × 3 locations) languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:17— languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:17 · languages/typescript/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts:21 · languages/typescript/packages/stack-prisma/migrations/20260814T0000_upgrade_eql_v3_3_0_5/migration.ts:27 — the 3 copies are spread across 3 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 (39 lines × 2 locations) languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:28— languages/typescript/packages/stack-prisma/migrations/20260720T0000_upgrade_eql_v3_3_0_2/migration.ts:28 · languages/typescript/packages/stack-prisma/migrations/20260728T0000_upgrade_eql_v3_3_0_4/migration.ts:32 — 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 (37 matched lines × 2 locations) · ×1
Duplicated block with local edits (37 matched lines × 2 locations) languages/typescript/packages/stack-prisma/migrations/20261002T0000_upgrade_eql_v3_3_0_6/migration.ts:45— languages/typescript/packages/stack-prisma/migrations/20261002T0000_upgrade_eql_v3_3_0_6/migration.ts:45 · languages/typescript/packages/stack-prisma/migrations/20261005T0000_upgrade_eql_v3_3_1_0/migration.ts:40 — the two spans are one implementation copied and then locally edited — 154 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 (31 lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:80— languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:80 · languages/typescript/packages/stack/src/encryption/operations/encrypt-model.ts:93 — 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 (30 lines × 2 locations) languages/typescript/packages/cli/src/commands/db/detect.ts:92— languages/typescript/packages/cli/src/commands/db/detect.ts:92 · languages/typescript/packages/cli/src/commands/db/detect.ts:132 — 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 (30 matched lines × 2 locations) · ×1
Duplicated block with local edits (30 matched lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:142— languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:142 · languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:208 — the two spans are one implementation copied and then locally edited — 203 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 (29 lines × 2 locations) languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:86— languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:86 · languages/typescript/packages/wizard/src/tools/wizard-tools.ts:179 — 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 (26 lines × 2 locations) languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:40— languages/typescript/packages/stack/src/encryption/operations/bulk-decrypt-models.ts:40 · languages/typescript/packages/stack/src/encryption/operations/decrypt-model.ts:39 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (25 matched lines × 2 locations) · ×1
Duplicated block with local edits (25 matched lines × 2 locations) languages/typescript/packages/stack/src/eql/v3/table.ts:118— languages/typescript/packages/stack/src/eql/v3/table.ts:118 · languages/typescript/packages/stack/src/schema/internal.ts:649 — the two spans are one implementation copied and then locally edited — 117 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 (24 lines × 4 locations) languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:404— languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:404 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:461 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:522 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:586 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (23 matched lines × 2 locations) · ×1
Duplicated block with local edits (23 matched lines × 2 locations) languages/typescript/packages/stack-drizzle/integration/adapter.ts:124— languages/typescript/packages/stack-drizzle/integration/adapter.ts:124 · languages/typescript/packages/stack/integration/wasm/adapter.ts:371 — the two spans are one implementation copied and then locally edited — 150 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 (22 lines × 4 locations) languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:174— languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:174 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:228 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:286 · languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:346 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (21 lines × 2 locations) languages/typescript/packages/stack/src/dynamodb/operations/base-operation.ts:32— languages/typescript/packages/stack/src/dynamodb/operations/base-operation.ts:32 · languages/typescript/packages/stack/src/encryption/operations/base-operation.ts:20 — 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 (20 lines × 4 locations) languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:72— languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:72 · languages/typescript/packages/stack-prisma/src/execution/envelope-json.ts:32 · languages/typescript/packages/stack-prisma/src/execution/envelope-string.ts:40 · languages/typescript/packages/stack-prisma/src/v3/envelope-number.ts:32 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (19 matched lines × 2 locations) · ×1
Duplicated block with local edits (19 matched lines × 2 locations) languages/typescript/packages/stack-supabase/src/query-encrypt.ts:350— languages/typescript/packages/stack-supabase/src/query-encrypt.ts:350 · languages/typescript/packages/stack-supabase/src/query-encrypt.ts:396 — the two spans are one implementation copied and then locally edited — 79 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 (18 matched lines × 2 locations) · ×1
Duplicated block with local edits (18 matched lines × 2 locations) languages/typescript/packages/cli/src/commands/encrypt/context.ts:50— languages/typescript/packages/cli/src/commands/encrypt/context.ts:50 · languages/typescript/packages/cli/src/config/index.ts:210 — the two spans are one implementation copied and then locally edited — 108 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 (18 lines × 5 locations) languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:80— languages/typescript/packages/stack-prisma/src/execution/envelope-bigint.ts:80 · languages/typescript/packages/stack-prisma/src/execution/envelope-date.ts:85 · languages/typescript/packages/stack-prisma/src/execution/envelope-json.ts:35 · languages/typescript/packages/stack-prisma/src/execution/envelope-string.ts:48 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is inside a TYPE DECLARATION, not executable code. There is no function to extract and no call site to call one from, so do not read this as an extract-a-helper row: the collapse a type offers is a generic — name the shape once, parameterised over the part that varies, and have each copy instantiate it. First check what actually differs between the copies: where they are a MATRIX of cases (one entry per input, differing precisely in the case each one pins), the repetition IS the enumeration and collapsing it would delete cases rather than de-duplicate anything — leave those alone. Reported because the copies that are not a matrix drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (16 matched lines × 2 locations) · ×1
Duplicated block with local edits (16 matched lines × 2 locations) languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:268— languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:268 · languages/typescript/packages/stack/src/encryption/helpers/model-traversal.ts:304 — the two spans are one implementation copied and then locally edited — 118 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function applyFilters (cyclomatic 48, cognitive 60) languages/typescript/packages/stack-supabase/src/query-filters.ts:136— applyFilters has cyclomatic complexity 48 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.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 47, cognitive 101) · ×1
Complex function run (cyclomatic 47, cognitive 101) languages/typescript/packages/wizard/src/agent/interface.ts:299— run has cyclomatic complexity 47 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 construct (cyclomatic 36, cognitive 50) languages/typescript/packages/stack-supabase/src/create.ts:218— construct has cyclomatic complexity 36 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function generateDrizzleEqlMigration (cyclomatic 34, cognitive 48) languages/typescript/packages/cli/src/commands/eql/migration.ts:386— generateDrizzleEqlMigration has cyclomatic complexity 34 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 decryptBackfillCommand (cyclomatic 34, cognitive 43) languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:111— decryptBackfillCommand has cyclomatic complexity 34 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 initCommand (cyclomatic 33, cognitive 41) languages/typescript/packages/cli/src/commands/init/index.ts:114— initCommand has cyclomatic complexity 33 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 collectQueryTerms (cyclomatic 32, cognitive 64) languages/typescript/packages/stack-supabase/src/query-terms.ts:112— collectQueryTerms has cyclomatic complexity 32 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 inspectReinstallDependencies (cyclomatic 32, cognitive 31) languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:494— inspectReinstallDependencies has cyclomatic complexity 32 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 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 validateSchemas (cyclomatic 31, cognitive 51) REDACTED:242— validateSchemas has cyclomatic complexity 31 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 31, cognitive 49) e2e/migration-guide/postgres.ts:171— (anonymous) has cyclomatic complexity 31 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 30, cognitive 39) · ×1
Complex function run (cyclomatic 30, cognitive 39) languages/typescript/packages/cli/src/commands/init/steps/install-deps.ts:193— run has cyclomatic complexity 30 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function assessEqlInstallation (cyclomatic 27, cognitive 36) languages/typescript/packages/cli/src/installer/installation-state.ts:78— assessEqlInstallation has cyclomatic complexity 27 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 statusCommand (cyclomatic 26, cognitive 43) languages/typescript/packages/cli/src/commands/db/status.ts:8— statusCommand has cyclomatic complexity 26 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 implCommand (cyclomatic 25, cognitive 49) languages/typescript/packages/cli/src/commands/impl/index.ts:146— implCommand has cyclomatic complexity 25 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 25, cognitive 39) · ×1
Complex function run (cyclomatic 25, cognitive 39) languages/typescript/packages/wizard/src/run.ts:40— run has cyclomatic complexity 25 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function diffSurface (cyclomatic 25, cognitive 36) languages/typescript/packages/cli/src/installer/verify.ts:719— diffSurface has cyclomatic complexity 25 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 installCommand (cyclomatic 25, cognitive 32) languages/typescript/packages/cli/src/commands/db/install.ts:101— installCommand has cyclomatic complexity 25 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 backfillCommand (cyclomatic 24, cognitive 30) languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:113— backfillCommand 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 wizardCanUseTool (cyclomatic 24, cognitive 27) languages/typescript/packages/wizard/src/agent/interface.ts:146— wizardCanUseTool has cyclomatic complexity 24 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 splitTopLevel (cyclomatic 24, cognitive 20) languages/typescript/packages/stack-supabase/src/helpers.ts:402— splitTopLevel has cyclomatic complexity 24 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function loadEncryptionContext (cyclomatic 23, cognitive 42) languages/typescript/packages/cli/src/commands/encrypt/context.ts:48— loadEncryptionContext has cyclomatic complexity 23 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 compareVersions (cyclomatic 23, cognitive 37) languages/typescript/packages/cli/src/runtime-versions.ts:121— compareVersions has cyclomatic complexity 23 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 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 decryptPlanCommand (cyclomatic 22, cognitive 26) languages/typescript/packages/cli/src/commands/decrypt/plan.ts:81— decryptPlanCommand has cyclomatic complexity 22 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 renderPreflightReport (cyclomatic 22, cognitive 21) languages/typescript/packages/cli/src/commands/db/preflight.ts:106— renderPreflightReport has cyclomatic complexity 22 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 coerceV3 (cyclomatic 21, cognitive 25) languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:303— coerceV3 has cyclomatic complexity 21 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 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 renderRow (cyclomatic 21, cognitive 18) languages/typescript/packages/cli/src/commands/encrypt/status.ts:143— renderRow has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 generateSupabaseEqlMigration (cyclomatic 20, cognitive 25) languages/typescript/packages/cli/src/commands/eql/migration.ts:242— generateSupabaseEqlMigration has cyclomatic complexity 20 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 20, cognitive 25) · ×1
Complex function run (cyclomatic 20, cognitive 25) languages/typescript/packages/cli/src/commands/init/steps/install-eql.ts:212— run has cyclomatic complexity 20 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 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 planCommand (cyclomatic 20, cognitive 25) languages/typescript/packages/cli/src/commands/plan/index.ts:197— planCommand has cyclomatic complexity 20 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 20, cognitive 11) · ×1
Complex function run (cyclomatic 20, cognitive 11) languages/typescript/packages/stack/integration/wasm/adapter.ts:280— run has cyclomatic complexity 20 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function processValue (cyclomatic 19, cognitive 23) languages/typescript/packages/stack/src/dynamodb/helpers.ts:518— processValue has cyclomatic complexity 19 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function goReleaseVersionErrors (cyclomatic 19, cognitive 22) scripts/go-release-version.mjs:64— goReleaseVersionErrors has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function restorationEvent (cyclomatic 19, cognitive 18) languages/typescript/packages/cli/src/installer/__tests__/restoration-scenarios.ts:193— restorationEvent has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 eqlLockstepSkew (cyclomatic 18, cognitive 36) scripts/sync-lockstep-versions.mjs:366— eqlLockstepSkew has cyclomatic complexity 18 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 renderOverview (cyclomatic 18, cognitive 30) languages/typescript/packages/cli/src/commands/decrypt/plan.ts:347— renderOverview has cyclomatic complexity 18 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 deriveColumnMigration (cyclomatic 18, cognitive 27) languages/typescript/packages/migrate/src/column-migration.ts:162— deriveColumnMigration has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 18, cognitive 20) · ×1
Complex function run (cyclomatic 18, cognitive 20) languages/typescript/packages/cli/src/commands/impl/steps/handoff-codex.ts:49— run has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveDatabaseUrl (cyclomatic 17, cognitive 26) languages/typescript/packages/cli/src/config/database-url.ts:206— resolveDatabaseUrl has cyclomatic complexity 17 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· languages/typescript/packages/stack/src/wasm-inline.ts · ×1
languages/typescript/packages/stack/src/wasm-inline.ts: 1899 lines of code languages/typescript/packages/stack/src/wasm-inline.ts:1— languages/typescript/packages/stack/src/wasm-inline.ts has 1899 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· languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts · ×1
languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts: 1306 lines of code languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts:1— languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts has 1306 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· languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts · ×1
languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts: 1187 lines of code languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts:1— languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts has 1187 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· languages/typescript/packages/cli/src/installer/verify.ts · ×1
languages/typescript/packages/cli/src/installer/verify.ts: 996 lines of code languages/typescript/packages/cli/src/installer/verify.ts:1— languages/typescript/packages/cli/src/installer/verify.ts has 996 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· languages/typescript/packages/stack-supabase/src/types.ts · ×1
languages/typescript/packages/stack-supabase/src/types.ts: 987 lines of code languages/typescript/packages/stack-supabase/src/types.ts:1— languages/typescript/packages/stack-supabase/src/types.ts has 987 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· languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts · ×1
languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts: 974 lines of code languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts:1— languages/typescript/packages/stack-prisma/src/v3/operators-v3.ts has 974 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· languages/typescript/packages/stack/src/encryption/index.ts · ×1
languages/typescript/packages/stack/src/encryption/index.ts: 946 lines of code languages/typescript/packages/stack/src/encryption/index.ts:1— languages/typescript/packages/stack/src/encryption/index.ts has 946 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· languages/typescript/packages/stack-drizzle/src/operators.ts · ×1
languages/typescript/packages/stack-drizzle/src/operators.ts: 916 lines of code languages/typescript/packages/stack-drizzle/src/operators.ts:1— languages/typescript/packages/stack-drizzle/src/operators.ts has 916 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: 848 lines of code REDACTED:1— REDACTED has 848 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· languages/typescript/packages/stack-supabase/src/query-builder.ts · ×1
languages/typescript/packages/stack-supabase/src/query-builder.ts: 832 lines of code languages/typescript/packages/stack-supabase/src/query-builder.ts:1— languages/typescript/packages/stack-supabase/src/query-builder.ts has 832 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· languages/typescript/packages/stack/src/eql/v3/columns.ts · ×1
languages/typescript/packages/stack/src/eql/v3/columns.ts: 776 lines of code languages/typescript/packages/stack/src/eql/v3/columns.ts:1— languages/typescript/packages/stack/src/eql/v3/columns.ts has 776 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· languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts · ×1
languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts: 775 lines of code languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts:1— languages/typescript/packages/cli/src/commands/init/lib/setup-prompt.ts has 775 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· languages/typescript/packages/migrate/src/column-migration.ts · ×1
languages/typescript/packages/migrate/src/column-migration.ts: 741 lines of code languages/typescript/packages/migrate/src/column-migration.ts:1— languages/typescript/packages/migrate/src/column-migration.ts has 741 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· languages/typescript/packages/stack/src/schema/internal.ts · ×1
languages/typescript/packages/stack/src/schema/internal.ts: 710 lines of code languages/typescript/packages/stack/src/schema/internal.ts:1— languages/typescript/packages/stack/src/schema/internal.ts has 710 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· languages/typescript/packages/test-kit/src/catalog.ts · ×1
languages/typescript/packages/test-kit/src/catalog.ts: 689 lines of code languages/typescript/packages/test-kit/src/catalog.ts:1— languages/typescript/packages/test-kit/src/catalog.ts has 689 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· languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts · ×1
languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts: 681 lines of code languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts:1— languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts has 681 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· languages/typescript/packages/stack/src/encryption/client-v3.ts · ×1
languages/typescript/packages/stack/src/encryption/client-v3.ts: 651 lines of code languages/typescript/packages/stack/src/encryption/client-v3.ts:1— languages/typescript/packages/stack/src/encryption/client-v3.ts has 651 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· languages/typescript/packages/stack-supabase/src/helpers.ts · ×1
languages/typescript/packages/stack-supabase/src/helpers.ts: 614 lines of code languages/typescript/packages/stack-supabase/src/helpers.ts:1— languages/typescript/packages/stack-supabase/src/helpers.ts has 614 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· languages/typescript/packages/migrate/src/decrypt.ts · ×1
languages/typescript/packages/migrate/src/decrypt.ts: 608 lines of code languages/typescript/packages/migrate/src/decrypt.ts:1— languages/typescript/packages/migrate/src/decrypt.ts has 608 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· languages/typescript/packages/stack/src/dynamodb/helpers.ts · ×1
languages/typescript/packages/stack/src/dynamodb/helpers.ts: 595 lines of code languages/typescript/packages/stack/src/dynamodb/helpers.ts:1— languages/typescript/packages/stack/src/dynamodb/helpers.ts has 595 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· languages/typescript/packages/cli/src/commands/eql/migration.ts · ×1
languages/typescript/packages/cli/src/commands/eql/migration.ts: 565 lines of code languages/typescript/packages/cli/src/commands/eql/migration.ts:1— languages/typescript/packages/cli/src/commands/eql/migration.ts has 565 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· languages/typescript/packages/cli/src/commands/encrypt/backfill.ts · ×1
languages/typescript/packages/cli/src/commands/encrypt/backfill.ts: 564 lines of code languages/typescript/packages/cli/src/commands/encrypt/backfill.ts:1— languages/typescript/packages/cli/src/commands/encrypt/backfill.ts has 564 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· languages/typescript/packages/cli/src/commands/env/index.ts · ×1
languages/typescript/packages/cli/src/commands/env/index.ts: 545 lines of code languages/typescript/packages/cli/src/commands/env/index.ts:1— languages/typescript/packages/cli/src/commands/env/index.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· languages/typescript/packages/wizard/src/agent/interface.ts · ×1
languages/typescript/packages/wizard/src/agent/interface.ts: 537 lines of code languages/typescript/packages/wizard/src/agent/interface.ts:1— languages/typescript/packages/wizard/src/agent/interface.ts has 537 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· languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts · ×1
languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts: 527 lines of code languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts:1— languages/typescript/packages/stack/src/encryption/helpers/model-helpers.ts has 527 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· languages/typescript/packages/cli/src/messages.ts · ×1
languages/typescript/packages/cli/src/messages.ts: 517 lines of code languages/typescript/packages/cli/src/messages.ts:1— languages/typescript/packages/cli/src/messages.ts has 517 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· languages/typescript/packages/stack/src/types.ts · ×1
languages/typescript/packages/stack/src/types.ts: 513 lines of code languages/typescript/packages/stack/src/types.ts:1— languages/typescript/packages/stack/src/types.ts has 513 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· languages/typescript/packages/cli/src/commands/init/utils.ts · ×1
languages/typescript/packages/cli/src/commands/init/utils.ts: 482 lines of code languages/typescript/packages/cli/src/commands/init/utils.ts:1— languages/typescript/packages/cli/src/commands/init/utils.ts has 482 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· languages/typescript/packages/protect-ffi/src/types.ts · ×1
languages/typescript/packages/protect-ffi/src/types.ts: 481 lines of code languages/typescript/packages/protect-ffi/src/types.ts:1— languages/typescript/packages/protect-ffi/src/types.ts has 481 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· languages/typescript/packages/stack-supabase/src/create.ts · ×1
languages/typescript/packages/stack-supabase/src/create.ts: 475 lines of code languages/typescript/packages/stack-supabase/src/create.ts:1— languages/typescript/packages/stack-supabase/src/create.ts has 475 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· languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts · ×1
languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts: 460 lines of code languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts:1— languages/typescript/packages/stack-prisma/src/v3/codec-runtime-v3.ts has 460 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· languages/typescript/packages/migrate/src/backfill.ts · ×1
languages/typescript/packages/migrate/src/backfill.ts: 443 lines of code languages/typescript/packages/migrate/src/backfill.ts:1— languages/typescript/packages/migrate/src/backfill.ts has 443 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· languages/typescript/packages/cli/src/commands/decrypt/backfill.ts · ×1
languages/typescript/packages/cli/src/commands/decrypt/backfill.ts: 442 lines of code languages/typescript/packages/cli/src/commands/decrypt/backfill.ts:1— languages/typescript/packages/cli/src/commands/decrypt/backfill.ts has 442 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· languages/typescript/packages/stack/integration/wasm/adapter.ts · ×1
languages/typescript/packages/stack/integration/wasm/adapter.ts: 437 lines of code languages/typescript/packages/stack/integration/wasm/adapter.ts:1— languages/typescript/packages/stack/integration/wasm/adapter.ts has 437 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· Type errors in this package cannot fail any build or CI step · ×1
Type errors in this package cannot fail any build or CI step scripts/__tests__/fixtures/lint-typecheck-scope/no-gate/package.json:3— `scripts/__tests__/fixtures/lint-typecheck-scope/no-gate` is TypeScript, but a type error in it cannot fail anything this repository runs: its `build` script (`tsup`) compiles TypeScript with a transpile-only tool that strips types without checking them, and no script, config or CI step of the package runs `tsc --noEmit` or another type checker over it. Add a type check that can fail — a `typecheck` script running `tsc --noEmit` (or `vue-tsc`/`svelte-check`) that CI or the workspace pipeline runs, or a build step that checks before it bundles.
Dead file (~366 LoC) languages/typescript/packages/wizard/src/run.ts— no import path from any entry point (299 application, 55 tooling, 572 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 (~149 LoC) languages/typescript/packages/cli/src/commands/doctor/index.ts— no import path from any entry point (299 application, 55 tooling, 572 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 (~109 LoC) languages/typescript/packages/wizard/src/agent/fetch-prompt.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/wizard/src/run.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~97 LoC) languages/typescript/packages/wizard/src/lib/changelog.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/wizard/src/run.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~93 LoC) languages/typescript/packages/utils/config/index.ts— no import path from any entry point (299 application, 55 tooling, 572 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 (~92 LoC) languages/typescript/packages/stack-prisma/src/exports/contract-space-typing.ts— no import path from any entry point (299 application, 55 tooling, 572 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 (~75 LoC) languages/typescript/packages/cli/src/commands/schema/build.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~65 LoC) languages/typescript/packages/cli/src/commands/telemetry/index.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/cli/src/commands/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~63 LoC) languages/typescript/packages/cli/src/commands/db/test-connection.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/cli/src/commands/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~61 LoC) languages/typescript/packages/cli/src/commands/encrypt/plan.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~34 LoC) languages/typescript/packages/cli/src/commands/manifest/index.ts— no import path from any entry point (299 application, 55 tooling, 572 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (languages/typescript/packages/cli/src/commands/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~14 LoC) languages/typescript/packages/cli/src/commands/index.ts— no import path from any entry point (299 application, 55 tooling, 572 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 'picocolors' languages/typescript/packages/cli/package.json:56— Declared in languages/typescript/packages/cli/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 '@clerk/backend' REDACTED:209— Declared in REDACTED 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 'execa' REDACTED:216— Declared in REDACTED 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 'json-schema-to-typescript' REDACTED:219— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked e2e/migration-guide/package.json:10— e2e/migration-guide/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X18 · Disposal-pattern correctness· Raw handle taken from an owned value and never reclaimed · ×1
Raw handle taken from an owned value and never reclaimed packages/stack-guest-abi/src/buffers.rs:83— `Box::into_raw(boxed)` (line 83) gives up ownership in exchange for a raw handle — the value's `Drop` will no longer run — and nothing in the crate's code ever reclaims a `Box` from a raw pointer (`Box::from_raw`). The memory or descriptor stays allocated until the process ends, once per call. Pair the hand-out with its reclaim (a `free` function that rebuilds the owner with `from_raw` and drops it), or keep the owning value.
Mock-dominated test: caches the decrypted plaintext for subsequent calls languages/typescript/packages/stack-prisma/test/envelope-string.test.ts:106— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: prompts before installing when interactive languages/typescript/packages/cli/src/commands/init/steps/__tests__/install-deps.test.ts:118— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: installs without prompting when non-interactive (#600) languages/typescript/packages/cli/src/commands/init/steps/__tests__/install-deps.test.ts:133— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: mixed ahead + missing: warns that fresh installs pin to THIS release and may mismatch languages/typescript/packages/cli/src/commands/init/steps/__tests__/install-deps.test.ts:349— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: still scaffolds stash.config.ts when the migration is already there languages/typescript/packages/cli/src/commands/init/steps/__tests__/install-eql.test.ts:463— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: warns that schema.ts and the snapshot diverged after staging a twin languages/typescript/packages/cli/src/commands/eql/__tests__/migration.test.ts:962— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not warn about reconciliation when nothing was staged languages/typescript/packages/cli/src/commands/eql/__tests__/migration.test.ts:1020— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: emits the standalone banners by default (embedded unset) languages/typescript/packages/cli/src/commands/eql/__tests__/migration.test.ts:1548— This test sets up 5 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: v3: refuses to generate when rows are still plaintext-only languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:210— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: v3: gates coverage on the RESOLVED encrypted column name languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:229— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: v3: refuses a by-elimination ('sole') match — uniqueness cannot prove the pairing languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:245— This test sets up 4 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 7 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: fails closed when EQL columns exist but none is identifiable languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:285— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: v3: rejects when not yet backfilled languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:305— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: rejects an unclassified legacy column instead of taking a v2 drop path languages/typescript/packages/cli/src/commands/encrypt/__tests__/encrypt-v3.test.ts:319— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: installs the migrations schema before running the backfill languages/typescript/packages/cli/src/commands/encrypt/__tests__/prisma-next-context.test.ts:248— This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 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: decrypts into the twin with its declared type, 500 rows per ZeroKMS request by default languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:136— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 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: refuses to start before the plaintext twin exists, pointing at decrypt plan languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:156— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: non-interactive first run: refuses without --confirm-dual-writes-deployed languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:172— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: records the reverse dual-write gate on first acceptance languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:185— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: prints an UndecryptableBatchError verbatim — it carries counts and codes only languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:233— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: refuses a twin whose forward migration was never dropped, even with --force, recording nothing languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:267— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: says --confirm-plaintext-current has no effect when there is nothing to confirm languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:375— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: a later waiver closes an up-front obligation no forced pass has started on languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:416— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: a waiver once a forced pass has started is refused, and nothing runs languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:445— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: a finished earlier column migration does not pass the dual-write gate languages/typescript/packages/cli/src/commands/decrypt/__tests__/decrypt-backfill.test.ts:474— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Duplicated predicate languages/golang/auth/transport.go:139— `resp.StatusCode < 100 || resp.StatusCode > 999` appears character-identically in 2 files — languages/golang/auth/transport.go, languages/golang/encrypt/transport.go. 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 languages/typescript/packages/stack/src/dynamodb/helpers.ts:317— `!('i' in obj) || typeof obj.i !== 'object'` appears character-identically in 2 files — languages/typescript/packages/stack/src/dynamodb/helpers.ts, languages/typescript/packages/stack/src/encryption/helpers/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 languages/typescript/packages/stack/src/dynamodb/helpers.ts:316— `!('v' in obj) || typeof obj.v !== 'number'` appears character-identically in 2 files — languages/typescript/packages/stack/src/dynamodb/helpers.ts, languages/typescript/packages/stack/src/encryption/helpers/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 languages/typescript/packages/stack/src/utils/config/index.ts:66— `!fs.existsSync(configPath) && !process.env.CS_WORKSPACE_CRN` appears character-identically in 2 files — languages/typescript/packages/stack/src/utils/config/index.ts, languages/typescript/packages/utils/config/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 languages/typescript/packages/stack/src/utils/config/index.ts:20— `!trimmedLine || trimmedLine.startsWith('#')` appears character-identically in 2 files — languages/typescript/packages/stack/src/utils/config/index.ts, languages/typescript/packages/utils/config/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 languages/typescript/packages/stack/src/encryption/index.ts:927— `clientConfig && Object.hasOwn(clientConfig, 'eqlVersion') && clientConfig.eqlVersion !== undefined` appears character-identically in 2 files — languages/typescript/packages/stack/src/encryption/index.ts, languages/typescript/packages/stack/src/wasm-inline.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 languages/typescript/packages/stack-supabase/src/create.ts:243— `code !== 'MODULE_NOT_FOUND' && code !== 'ERR_MODULE_NOT_FOUND'` appears character-identically in 2 files — languages/typescript/packages/stack-supabase/src/create.ts, languages/typescript/packages/stack-supabase/src/introspect.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 languages/typescript/packages/stack-supabase/src/query-filters.ts:48— `cond.op === 'in' && Array.isArray(cond.value)` appears character-identically in 2 files — languages/typescript/packages/stack-supabase/src/query-filters.ts, languages/typescript/packages/stack-supabase/src/query-terms.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 languages/typescript/packages/stack/src/utils/config/index.ts:34— `currentSection === 'auth' && key === 'workspace_crn'` appears character-identically in 2 files — languages/typescript/packages/stack/src/utils/config/index.ts, languages/typescript/packages/utils/config/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 languages/typescript/packages/cli/src/commands/decrypt/plan.ts:357— `domain === null || classifyEqlDomain(domain) !== 3` appears character-identically in 2 files — languages/typescript/packages/cli/src/commands/decrypt/plan.ts, languages/typescript/packages/cli/src/commands/decrypt/status.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 languages/typescript/packages/cli/src/commands/init/utils.ts:101— `existsSync(resolve(cwd, 'bun.lockb')) || existsSync(resolve(cwd, 'bun.lock'))` appears character-identically in 2 files — languages/typescript/packages/cli/src/commands/init/utils.ts, languages/typescript/packages/wizard/src/lib/detect.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 languages/typescript/packages/stack-prisma/src/execution/decrypt-all.ts:163— `handle.table === undefined || handle.column === undefined` appears character-identically in 3 files — languages/typescript/packages/stack-prisma/src/execution/decrypt-all.ts, languages/typescript/packages/stack-prisma/src/execution/routing.ts, languages/typescript/packages/stack-prisma/src/v3/bulk-encrypt-v3.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 languages/typescript/packages/cli/src/commands/status/index.ts:242— `log.active.length === 0 && log.completed.length === 0` appears character-identically in 2 files — languages/typescript/packages/cli/src/commands/status/index.ts, languages/typescript/packages/cli/src/commands/status/render.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 languages/typescript/packages/nextjs/src/cts/index.ts:197— `process.env.CS_CTS_ENDPOINT || 'https://ap-southeast-2.aws.auth.viturhosted.net'` appears character-identically in 2 files — languages/typescript/packages/nextjs/src/cts/index.ts, languages/typescript/packages/stack/src/identity/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 languages/typescript/packages/cli/src/telemetry/index.ts:118— `raw != null && raw !== '' && raw !== '0' && raw !== 'false'` appears character-identically in 2 files — languages/typescript/packages/cli/src/telemetry/index.ts, languages/typescript/packages/wizard/src/lib/analytics.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 languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts:39— `term.value !== null && term.value !== undefined` appears character-identically in 2 files — languages/typescript/packages/stack/src/encryption/operations/batch-encrypt-query.ts, languages/typescript/packages/stack/src/wasm-inline.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 languages/typescript/packages/protect-ffi/src/errors.ts:91— `typeof error !== 'object' || error === null` appears character-identically in 3 files — languages/typescript/packages/protect-ffi/src/errors.ts, languages/typescript/packages/stack/src/encryption/helpers/auth-failure.ts, languages/typescript/packages/stack/src/wasm-inline.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 languages/typescript/packages/nextjs/src/cts/index.ts:75— `typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)` appears character-identically in 2 files — languages/typescript/packages/nextjs/src/cts/index.ts, languages/typescript/packages/stack/src/identity/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 languages/typescript/packages/nextjs/src/session.ts:75— `typeof value !== 'object' || value === null` appears character-identically in 2 files — languages/typescript/packages/nextjs/src/session.ts, languages/typescript/packages/stack-prisma/src/v3/sdk-adapter-v3.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 languages/typescript/packages/nextjs/src/session.ts:53— `typeof value !== 'object' || value === null || Array.isArray(value)` appears character-identically in 2 files — languages/typescript/packages/nextjs/src/session.ts, languages/typescript/packages/stack-drizzle/src/codec.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 languages/typescript/packages/stack/src/encryption/helpers/validation.ts:45— `typeof value === 'number' && !Number.isFinite(value)` appears character-identically in 2 files — languages/typescript/packages/stack/src/encryption/helpers/validation.ts, languages/typescript/packages/stack/src/eql/v3/selector-path.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 languages/typescript/packages/cli/src/telemetry/state.ts:36— `typeof value === 'object' && value !== null` appears character-identically in 3 files — languages/typescript/packages/cli/src/telemetry/state.ts, languages/typescript/packages/stack-prisma/src/exports/contract-space-typing.ts, languages/typescript/packages/stack/src/utils/logger/describe-failure.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 languages/typescript/packages/nextjs/src/cts/index.ts:82— `typeof value === 'string' && value.trim() !== ''` appears character-identically in 2 files — languages/typescript/packages/nextjs/src/cts/index.ts, languages/typescript/packages/stack/src/identity/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 languages/typescript/packages/cli/src/runtime-versions.ts:57— `typeof version !== 'string' || version.length === 0` appears character-identically in 3 files — languages/typescript/packages/cli/src/runtime-versions.ts, languages/typescript/packages/cli/tsup.config.ts, scripts/sync-lockstep-versions.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate languages/typescript/packages/cli/src/commands/init/lib/introspect.ts:67— `udtName === 'eql_v2_encrypted' || udtName.startsWith('eql_v3_')` appears character-identically in 2 files — languages/typescript/packages/cli/src/commands/init/lib/introspect.ts, languages/typescript/packages/wizard/src/tools/wizard-tools.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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/darwin-arm64/README.md:1— `darwin-arm64` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/darwin-arm64/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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/darwin-x64/README.md:1— `darwin-x64` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/darwin-x64/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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/linux-arm64-gnu/README.md:1— `linux-arm64-gnu` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/linux-arm64-gnu/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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/linux-x64-gnu/README.md:1— `linux-x64-gnu` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/linux-x64-gnu/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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/linux-x64-musl/README.md:1— `linux-x64-musl` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/linux-x64-musl/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.
Documentation: no build, run or usage example languages/typescript/packages/auth/platforms/win32-x64-msvc/README.md:1— `win32-x64-msvc` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/auth/platforms/win32-x64-msvc/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.
Documentation: no build, run or usage example languages/typescript/packages/nextjs/README.md:1— `nextjs` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/nextjs/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/darwin-arm64/README.md:1— `darwin-arm64` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/darwin-arm64/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/darwin-x64/README.md:1— `darwin-x64` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/darwin-x64/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/linux-arm64-gnu/README.md:1— `linux-arm64-gnu` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/linux-arm64-gnu/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/linux-x64-gnu/README.md:1— `linux-x64-gnu` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/linux-x64-gnu/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/linux-x64-musl/README.md:1— `linux-x64-musl` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/linux-x64-musl/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.
Documentation: no build, run or usage example languages/typescript/packages/protect-ffi/platforms/win32-x64-msvc/README.md:1— `win32-x64-msvc` is a published package (`REDACTED` without `"private": true`) and neither `languages/typescript/packages/protect-ffi/platforms/win32-x64-msvc/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.
P2 · Observability· Console output used as the logging channel · ×9
Console output used as the logging channel languages/typescript/packages/stack/src/wasm-inline.ts:1915— `languages/typescript/packages/stack/src/wasm-inline.ts` reports through `console.*` at line 1915 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/stack/src/schema/internal.ts:748— `languages/typescript/packages/stack/src/schema/internal.ts` reports through `console.*` at line 748 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/stack/src/encryption/client-v3.ts:362— `languages/typescript/packages/stack/src/encryption/client-v3.ts` reports through `console.*` at line 362 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:487— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 487 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:488— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 488 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:489— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 489 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:520— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 520 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:521— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 521 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel languages/typescript/packages/wizard/src/agent/interface.ts:522— `languages/typescript/packages/wizard/src/agent/interface.ts` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:181— `trace!` at line 181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:195— `trace!` at line 195 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:210— `trace!` at line 210 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:213— `trace!` at line 213 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:363— `trace!` at line 363 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-kms/src/client.rs:538— `debug!` at line 538 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-auth/src/device_session_strategy.rs:257— `warn!` at line 257 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging packages/stack-auth/src/device_session_strategy.rs:305— `warn!` at line 305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Silent fallback default in catch languages/typescript/packages/cli/src/commands/plan/index.ts:158— `detectPlanStep` swallows every exception into `return 'rollout'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch languages/typescript/packages/cli/src/commands/eql/supabase-migration.ts:120— `findEqlDependentMigrationsBefore` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch languages/typescript/packages/cli/src/installer/bundle-digest.ts:42— `resolvedBundlePath` swallows every exception into `return '<unknown: @cipherstash/eql/sql installSqlPath() threw>'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch languages/typescript/packages/nextjs/src/cts/index.ts:72— `readCtsRefusal` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch languages/typescript/packages/stack/src/identity/index.ts:74— `readCtsRefusal` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:518— `npmDeclarations` 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.
redundant comment languages/typescript/packages/stack/__tests__/audit.test.ts:79— 12 comments in this file only repeat the code they sit on (lines 79, 104, 133, 158, 200, 232, 280, 305, 380, 395, 442, 457), for example "Encrypt the model with audit". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment languages/typescript/packages/stack/__tests__/bulk-protect.test.ts:252— "Decrypt with lock context" repeats the code it sits on: 3 of its 3 words (decrypt, lock, context) are already in `const decryptedData = await protectClient`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment languages/typescript/packages/stack/__tests__/protect-ops.test.ts:685— 5 comments in this file only repeat the code they sit on (lines 685, 694, 730, 774, 783), for example "Encrypt the model with lock context". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/lint-no-workflow-caching.mjs:393— "`uses: actions/cache...`" repeats the code it sits on: 3 of its 3 words (uses, actions, cache) are already in `offenders.push(`${at}: uses \`${uses}\` (GitHub Actions cache)`)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×4
Projects may be oversized for their cohesion languages/typescript/packages/cli/package.json:1— `languages/typescript/packages/cli` (22932 LoC, 225 module-visible types across 28 directories) overshoots its size bounds. 4 of 28 build unit(s) (Cargo, Go, npm) overshoot their size bounds, lowering Project Cohesion to 7.3/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `languages/typescript/packages/stack` (13242 LoC, 157 module-visible types across 15 directories) overshoots its size bounds. 4 of 28 build unit(s) (Cargo, Go, npm) overshoot their size bounds, lowering Project Cohesion to 7.3/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `languages/golang` (11909 LoC, 116 module-visible types across 16 directories) overshoots its size bounds. 4 of 28 build unit(s) (Cargo, Go, npm) overshoot their size bounds, lowering Project Cohesion to 7.3/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion languages/typescript/packages/stack-prisma/package.json:1— `languages/typescript/packages/stack-prisma` (7086 LoC, 68 module-visible types across 14 directories) overshoots its size bounds. 4 of 28 build unit(s) (Cargo, Go, npm) overshoot their size bounds, lowering Project Cohesion to 7.3/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.
Orphaned file languages/typescript/packages/protect-ffi/crates/protect-ffi/src/encrypt_config.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file languages/typescript/packages/protect-ffi/crates/protect-ffi/src/query_op.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file packages/eql/crates/eql-bindings/src/v3/terms.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file languages/typescript/packages/protect-ffi/src/bigintWire.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.
Fat interface: SupabaseQueryBuilder (30 required operations) languages/typescript/packages/stack-supabase/src/types.ts:759— `SupabaseQueryBuilder` declares 30 required operations: `select`, `insert`, `update`, `upsert`, `delete`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`, `contains`, `is`, `in`, `filter`, `not`, `or`, `match`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `throwOnError`, `returns`, `then`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: EncryptedQueryBuilderCore (30 required operations) languages/typescript/packages/stack-supabase/src/types.ts:847— `EncryptedQueryBuilderCore` declares 30 required operations: `select`, `insert`, `update`, `upsert`, `delete`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `is`, `is`, `in`, `filter`, `not`, `or`, `or`, `match`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `throwOnError`, `returns`, `withLockContext`, `audit`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 30 declarations carry 28 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 28 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: EncryptionClient (16 required operations) languages/typescript/packages/stack/src/encryption/client-v3.ts:176— `EncryptionClient` declares 16 required operations under just 11 distinct name(s): `encrypt`, `encryptQuery`, `encryptQuery`, `encryptModel`, `bulkEncryptModels`, `decrypt`, `decryptModel`, `decryptModel`, `decryptModel`, `bulkDecryptModels`, `bulkDecryptModels`, `bulkDecryptModels`, `bulkEncrypt`, `bulkDecrypt`, `getEncryptConfig`, `getSchemas`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 136 significant file(s) lose their only recent owner: packages/stack-encrypt/src/dynamic/record.rs, packages/stack-auth/src/oidc_federation_strategy.rs, languages/typescript/packages/auth/src/lib.rs, packages/stack-encrypt/src/keyset.rs, packages/stack-encrypt/src/target/pending.rs, packages/stack-encrypt/src/descriptor.rs, packages/stack-encrypt-derive/src/shape.rs, packages/stack-encrypt/src/sem/mod.rs (+128 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 30 significant file(s) lose their only recent owner: languages/typescript/packages/wizard/src/lib/rewrite-migrations.ts, languages/typescript/packages/cli/src/commands/db/rewrite-migrations.ts, REDACTED, languages/typescript/packages/stack/src/encryption/client-v3.ts, languages/typescript/packages/stack/src/eql/v3/columns.ts, languages/typescript/packages/cli/src/installer/derived-search-index-restoration.ts, languages/typescript/packages/stack/src/dynamodb/helpers.ts, languages/typescript/packages/stack-supabase/src/query-encrypt.ts (+22 more). Pair on, review, or document these before any departure.
D20 · ADR Quality· ADR has no Context section · ×2
ADR has no Context section languages/typescript/packages/migrate/docs/adr/0001-forced-pass-is-an-obligation.md:6— languages/typescript/packages/migrate/docs/adr/0001-forced-pass-is-an-obligation.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section packages/stack-encrypt/docs/adr/0003-declarative-targets-and-ciphertext-transcoding.md:7— packages/stack-encrypt/docs/adr/0003-declarative-targets-and-ciphertext-transcoding.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
Silent fallback default on Err languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:590— `thrown_to_string` turns every `Err` into `"<non-stringifiable error>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err packages/stack-auth/src/transport.rs:535— `http_client` turns every `Err` into `reqwest::Client::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (168 single-owned of 429 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 429 of the 573 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: languages/typescript/packages/cli/src/commands/status/render.ts, languages/typescript/packages/cli/src/commands/init/lib/parse-plan.ts.
D20 · ADR Quality· ADR has no Context and Decision section · ×1
ADR has no Context and Decision section packages/stack-encrypt/docs/adr/0001-context-optional-cipher-directed-path.md:6— packages/stack-encrypt/docs/adr/0001-context-optional-cipher-directed-path.md has no Context and Decision section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D21 · Naming Consistency· `renderQuestLogJSON` spells `JSON` where 27 names in the project spell it `Json` · ×1
`renderQuestLogJSON` spells `JSON` where 27 names in the project spell it `Json` languages/typescript/packages/cli/src/commands/status/render.ts:213— 27 of 29 names in project @cipherstash/stack-monorepo spell the token `Json` (27 of 29; unit: names in project @cipherstash/stack-monorepo containing `Json`). Peers: events.emitJsonEvent (languages/typescript/packages/cli/src/commands/auth/events.ts:12); events.emitJsonError (languages/typescript/packages/cli/src/commands/auth/events.ts:31); newClientArgs.nameTheKeyJsonCannotCarry (languages/typescript/packages/protect-ffi/src/newClientArgs.ts:49); json-adapter.makeDrizzleJsonAdapter (languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:27); json-adapter.makePrismaNextJsonAdapter (languages/typescript/packages/stack-prisma/integration/json-adapter.ts:47). Rename to `renderQuestLogJson`. [rule N6]
D21 · Naming Consistency· `toJSON` spells `JSON` where 27 names in the project spell it `Json` · ×1
`toJSON` spells `JSON` where 27 names in the project spell it `Json` languages/typescript/packages/stack-prisma/src/execution/envelope-base.ts:225— 27 of 29 names in project @cipherstash/stack-monorepo spell the token `Json` (27 of 29; unit: names in project @cipherstash/stack-monorepo containing `Json`). Peers: events.emitJsonEvent (languages/typescript/packages/cli/src/commands/auth/events.ts:12); events.emitJsonError (languages/typescript/packages/cli/src/commands/auth/events.ts:31); newClientArgs.nameTheKeyJsonCannotCarry (languages/typescript/packages/protect-ffi/src/newClientArgs.ts:49); json-adapter.makeDrizzleJsonAdapter (languages/typescript/packages/stack-drizzle/integration/json-adapter.ts:27); json-adapter.makePrismaNextJsonAdapter (languages/typescript/packages/stack-prisma/integration/json-adapter.ts:47). Rename to `toJson`. [rule N6]
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 4 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: languages/typescript/packages/protect-ffi/crates/protect-ffi/src/encrypt_config.rs, languages/typescript/packages/protect-ffi/crates/protect-ffi/src/query_op.rs, packages/eql/crates/eql-bindings/src/v3/terms.rs, languages/typescript/packages/protect-ffi/src/bigintWire.ts (7 orphaned of 436 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 436 of the 573 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
DM9 · Scattered domain decisions· Rule about [active, completed] decided in 2 places · ×1
Rule about [active, completed] decided in 2 places — languages.typescript.packages.cli.src.commands.status.quest.QuestLog's [active, completed] are judged in languages.typescript.packages.cli.src.commands.index, languages.typescript.packages.cli.src.commands.status.render — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [column, table] decided in 4 places · ×1
Rule about [column, table] decided in 4 places — languages.typescript.packages.stack-prisma.src.execution.envelope-base.EncryptedEnvelopeHandle's [column, table] are judged in languages.typescript.packages.stack-prisma.src.execution.decrypt-all, languages.typescript.packages.stack-prisma.src.execution.envelope-base.EncryptedEnvelopeBase, languages.typescript.packages.stack-prisma.src.execution.routing, languages.typescript.packages.stack-prisma.src.v3.bulk-encrypt-v3 — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
M2 · Architecture documentation· Architecture diagram out of date · ×1
Architecture diagram out of date packages/eql/docs/reference/catalog-driven-architecture.md:252— `packages/eql/docs/reference/catalog-driven-architecture.md` draws the system's parts, and the drawing no longer matches the code: it names `eql_v3`, `eql_v3_integer`, which no project, package or service of the repository is. A diagram of a system that no longer exists misleads the reader it was drawn for, so it is not credited as documenting the shape.
Logging is not universal — Only 9/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `languages/typescript/packages/protect-ffi/crates/protect-ffi`, `packages/eql/crates/eql-bindings`, `packages/eql/crates/eql-codegen`.
R7 · Dead Code· Unused export 'preflightCommand' · ×1
Unused export 'preflightCommand' languages/typescript/packages/cli/src/commands/db/preflight.ts:31— Nothing ultimately consumes this binding: its only referrer is the re-export in languages/typescript/packages/cli/src/commands/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 languages/typescript/packages/cli/src/commands/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'verifyCommand' · ×1
Unused export 'verifyCommand' languages/typescript/packages/cli/src/commands/eql/verify.ts:27— Nothing imports this binding — it is safe to review for removal.
Unused export 'StageStatus' languages/typescript/packages/cli/src/commands/status/index.ts:65— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'statusCommand' · ×1
Unused export 'statusCommand' languages/typescript/packages/cli/src/commands/status/index.ts:188— Nothing ultimately consumes this binding: its only referrer is the re-export in languages/typescript/packages/cli/src/commands/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 languages/typescript/packages/cli/src/commands/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'wizardCommand' · ×1
Unused export 'wizardCommand' languages/typescript/packages/cli/src/commands/wizard/index.ts:78— Nothing ultimately consumes this binding: its only referrer is the re-export in languages/typescript/packages/cli/src/commands/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 languages/typescript/packages/cli/src/commands/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'supabaseGrantsFor' · ×1
Unused export 'supabaseGrantsFor' languages/typescript/packages/cli/src/installer/index.ts:42— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'validateValueIndexCompatibility' · ×1
Unused export 'validateValueIndexCompatibility' languages/typescript/packages/stack/src/encryption/helpers/validation.ts:94— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'DANGEROUS_BASH_OPERATORS' · ×1
Unused export 'DANGEROUS_BASH_OPERATORS' languages/typescript/packages/wizard/src/agent/hooks.ts:16— Nothing imports this binding — it is safe to review for removal.
Unused export 'INTEGRATIONS' languages/typescript/packages/wizard/src/lib/constants.ts:4— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'CIPHERSTASH_API_URL' · ×1
Unused export 'CIPHERSTASH_API_URL' languages/typescript/packages/wizard/src/lib/constants.ts:25— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'DETECTION_TIMEOUT_MS' · ×1
Unused export 'DETECTION_TIMEOUT_MS' languages/typescript/packages/wizard/src/lib/constants.ts:34— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'MIN_NODE_VERSION' · ×1
Unused export 'MIN_NODE_VERSION' languages/typescript/packages/wizard/src/lib/constants.ts:40— Nothing imports this binding — it is safe to review for removal.
Unused export 'ISSUES_URL' languages/typescript/packages/wizard/src/lib/constants.ts:43— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'FrameworkConfig' · ×1
Unused export 'FrameworkConfig' languages/typescript/packages/wizard/src/lib/types.ts:49— Nothing imports this binding — it is safe to review for removal.
Unused export 'AgentSignals' languages/typescript/packages/wizard/src/lib/types.ts:92— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused module-local declaration 'User' · ×1
Unused module-local declaration 'User' languages/typescript/packages/stack/__tests__/bulk-protect.test.ts:14— 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 'ALLOWED_WRITE_PATHS' · ×1
Unused module-local declaration 'ALLOWED_WRITE_PATHS' languages/typescript/packages/wizard/src/agent/interface.ts:107— 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.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context or an AbortSignal · ×1
Not all functions that make a request accept a context.Context or an AbortSignal — Only 5/8 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Silent fallback default on error languages/golang/stashgen/read.go:750— `embeddedTags` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Subsumed condition operand languages/typescript/packages/protect-ffi/crates/protect-ffi/src/lib.rs:3599— `err_msg.contains("$.user.email")` can never decide this `||` — every value satisfying `err_msg.contains("$.user.email")` also satisfies `err_msg.contains("$")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Skipped (documented): (unnamed test) scripts/__tests__/bench-index-expressions.test.mjs:175— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) scripts/__tests__/go-release-artifact.test.mjs:169— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) scripts/__tests__/go-release-artifact.test.mjs:306— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) languages/typescript/packages/wizard/src/__tests__/health-checks.test.ts:74— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) languages/typescript/packages/protect-ffi/src/lintWiring.test.ts:419— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
doc comments repeat the names languages/typescript/packages/migrate/src/decrypt.ts:178— 0 of 2 documented parameters and 1 of 248 summaries in `@cipherstash/migrate` only repeat the member or parameter name (e.g. "Result of ." for `DecryptBackfillResult`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names languages/typescript/packages/stack/src/encryption/index.ts:666— 0 of 38 documented parameters and 1 of 448 summaries in `@cipherstash/stack` only repeat the member or parameter name (e.g. "Get the encrypt config object." for `getEncryptConfig`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names languages/typescript/packages/stack-supabase/src/types.ts:20— 0 of 1 documented parameters and 1 of 262 summaries in `@cipherstash/stack-supabase` only repeat the member or parameter name (e.g. "Options for ." for `EncryptedSupabaseOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names languages/typescript/packages/wizard/src/agent/interface.ts:43— 0 of 0 documented parameters and 2 of 143 summaries in `@cipherstash/wizard` only repeat the member or parameter name (e.g. "Duration in ms." for `durationMs`). Delete the restating tags, or add what the name does not say.
Outdated: golang.org/x/oauth2 — `golang.org/x/oauth2` is required at v0.37.0 in REDACTED, but v0.38.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/oauth2@v0.38.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.49.0 in REDACTED, but v0.50.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sys@v0.50.0 && go mod tidy` and commit the updated REDACTED and go.sum.
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 21 file(s) — `languages/golang/encrypt/gensupport/convert.go`, `languages/typescript/packages/auth/wasm-inline.d.ts`, `languages/typescript/packages/cli/src/commands/init/lib/parse-plan.ts`, `languages/typescript/packages/migrate/src/state.ts`, `languages/typescript/packages/stack-drizzle/src/column.ts`, … (+16 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e7c1-77e5-78e3-8a06-d11d7ed55f1d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 123 · Warnings: 974 · Recommendations: 162 · Info: 11 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 04:26 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.