Public report of taskforcesh/bullmq, 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, 18:49 UTC · Survey ID cd_c519a9411dd1409ab30c03be2838a48a
taskforcesh/bullmq
Measured 17 November 2026, 18:49 UTC, at code version ba63962
First survey, so nothing to compare with yet
CAI scoreAdequate
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 medium codebase: 74,194 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 1.4 person-years · Weakest lens: Production Readiness, 52.4
Findings by how serious they are
50 critical487 serious78 minor
18 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, 18:49 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 ▸
55of 55 dimensions measured by tools.
610of 615 findings point to an exact file and line, so you can open each one in the code. The other 5 concern the repository as a whole, such as missing documentation.
55dimensions across 7 lenses, read from 74,194 lines of product code in 6 projects.
taskforcesh/bullmq falls short of our standard for production, in part because it has uses of packages that aren't listed. It scores 62.6 out of 100 and is rated Adequate, and 39 of its 50 critical findings are security problems in the build pipeline and in the packages it uses.
Production Readiness, at 52.4, is the weakest lens and counts most in the score. The best first step is tidying the declared packages, worth about 7.7 points. Moving to versioned database migrations comes next, worth about 5.1 points. Raising Production Readiness to 70 would lift the score to about 70.1.
Twenty-five pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Nine known security holes in the packages the code depends on can be used by attackers, and five pipeline steps install packages that can change without warning. Pinning each tool to an exact version, updating the vulnerable packages and pinning what the pipeline installs would close these risks. The seven errors that are caught and ignored need handling or logging instead of being ignored.
The product code is 74,194 lines, about €200,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 52.4 to 70, the lowest score rated Strong, the score would rise from 62.6 to about 70.1.
Code composition: what the lines of code are
Business logic 3%Supporting code 2%Tests 95%
Rebuild cost: about €200,000 · Estimate
Cost to rebuild
€67,000 to €330,000, for 1,109 to 3,525 hours of work, about 1.4 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 63. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 74,194 lines of product code
Comment lines
The estimate prices 73,279 lines. Comment lines count towards the size of 74,194 lines but aren't priced as work.
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.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 7.7 points · Medium effort · Dependency Hygiene
2
Move each table the code creates at runtime into the versioned migrations the repository already applies.
Raises the score by about 5.1 points · Medium effort · Schema migrations
3
Resolve the 7 EmptyCatchBlock finding(s) in Explicit Debt — start with PostgresConnection.cs (5), QueueEvents.cs (2).
Raises the score by about 1.4 points · Low effort · Explicit Debt
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 €200,000 to build again, about 1.4 person-years of work. Its weakest lens is Production Readiness, at 52.4 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies. Of all the actions in this report, it raises the score most for the work it takes: about 7.7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
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.
152 modules, with 222 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 112 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.
bullmq_official.options uses bullmq_official.types, so a change to bullmq_official.types can break bullmq_official.options, while a change to bullmq_official.options can't break bullmq_official.types.
Position
Below the diagonal: bullmq_official.options uses a module listed above it, which is the healthy direction.
python.bullmq.queue uses python.bullmq.event_emitter, so a change to python.bullmq.event_emitter can break python.bullmq.queue, while a change to python.bullmq.queue can't break python.bullmq.event_emitter.
Position
Below the diagonal: python.bullmq.queue uses a module listed above it, which is the healthy direction.
python.bullmq.queue uses python.bullmq.types.job_options, so a change to python.bullmq.types.job_options can break python.bullmq.queue, while a change to python.bullmq.queue can't break python.bullmq.types.job_options.
Position
Below the diagonal: python.bullmq.queue uses a module listed above it, which is the healthy direction.
src uses src.enums.telemetry-attributes, so a change to src.enums.telemetry-attributes can break src, while a change to src can't break src.enums.telemetry-attributes.
Position
Below the diagonal: src uses a module listed above it, which is the healthy direction.
src.classes.redis-connection uses src.interfaces.connection, so a change to src.interfaces.connection can break src.classes.redis-connection, while a change to src.classes.redis-connection can't break src.interfaces.connection.
Position
Below the diagonal: src.classes.redis-connection uses a module listed above it, which is the healthy direction.
src.interfaces.job-json uses src.types.job-progress, so a change to src.types.job-progress can break src.interfaces.job-json, while a change to src.interfaces.job-json can't break src.types.job-progress.
Position
Below the diagonal: src.interfaces.job-json uses a module listed above it, which is the healthy direction.
src.interfaces.telemetry uses src.enums.telemetry-attributes, so a change to src.enums.telemetry-attributes can break src.interfaces.telemetry, while a change to src.interfaces.telemetry can't break src.enums.telemetry-attributes.
Position
Below the diagonal: src.interfaces.telemetry uses a module listed above it, which is the healthy direction.
bullmq_official.redis_connection uses bullmq_official.options, so a change to bullmq_official.options can break bullmq_official.redis_connection, while a change to bullmq_official.redis_connection can't break bullmq_official.options.
Position
Below the diagonal: bullmq_official.redis_connection uses a module listed above it, which is the healthy direction.
python.bullmq.job uses python.bullmq.types.job_options, so a change to python.bullmq.types.job_options can break python.bullmq.job, while a change to python.bullmq.job can't break python.bullmq.types.job_options.
Position
Below the diagonal: python.bullmq.job uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in python.bullmq.job uses a type in python.bullmq.queue.
The types involved
python.bullmq.job.Job → python.bullmq.queue.Queue
Direction
python.bullmq.job uses python.bullmq.queue, so a change to python.bullmq.queue can break python.bullmq.job, while a change to python.bullmq.job can't break python.bullmq.queue.
Position
Below the diagonal: python.bullmq.job uses a module listed above it, which is the healthy direction.
src.classes.redis-relay-backend uses src.interfaces.relay-backend, so a change to src.interfaces.relay-backend can break src.classes.redis-relay-backend, while a change to src.classes.redis-relay-backend can't break src.interfaces.relay-backend.
Position
Below the diagonal: src.classes.redis-relay-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-relay-backend uses src.classes.redis-connection, so a change to src.classes.redis-connection can break src.classes.redis-relay-backend, while a change to src.classes.redis-relay-backend can't break src.classes.redis-connection.
Position
Below the diagonal: src.classes.redis-relay-backend uses a module listed above it, which is the healthy direction.
src.interfaces.minimal-job uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.interfaces.minimal-job, while a change to src.interfaces.minimal-job can't break src.interfaces.job-json.
Position
Below the diagonal: src.interfaces.minimal-job uses a module listed above it, which is the healthy direction.
src.interfaces.queue-options uses src.interfaces.telemetry, so a change to src.interfaces.telemetry can break src.interfaces.queue-options, while a change to src.interfaces.queue-options can't break src.interfaces.telemetry.
Position
Below the diagonal: src.interfaces.queue-options uses a module listed above it, which is the healthy direction.
src.interfaces.worker-options uses src.interfaces.telemetry, so a change to src.interfaces.telemetry can break src.interfaces.worker-options, while a change to src.interfaces.worker-options can't break src.interfaces.telemetry.
Position
Below the diagonal: src.interfaces.worker-options uses a module listed above it, which is the healthy direction.
bullmq_official.job uses bullmq_official.keys, so a change to bullmq_official.keys can break bullmq_official.job, while a change to bullmq_official.job can't break bullmq_official.keys.
Position
Below the diagonal: bullmq_official.job uses a module listed above it, which is the healthy direction.
bullmq_official.job uses bullmq_official.types, so a change to bullmq_official.types can break bullmq_official.job, while a change to bullmq_official.job can't break bullmq_official.types.
Position
Below the diagonal: bullmq_official.job uses a module listed above it, which is the healthy direction.
bullmq_official.job uses bullmq_official.options, so a change to bullmq_official.options can break bullmq_official.job, while a change to bullmq_official.job can't break bullmq_official.options.
Position
Below the diagonal: bullmq_official.job uses a module listed above it, which is the healthy direction.
bullmq_official.job uses bullmq_official.redis_connection, so a change to bullmq_official.redis_connection can break bullmq_official.job, while a change to bullmq_official.job can't break bullmq_official.redis_connection.
Position
Below the diagonal: bullmq_official.job uses a module listed above it, which is the healthy direction.
src.interfaces.queue-backend uses src.types.job-progress, so a change to src.types.job-progress can break src.interfaces.queue-backend, while a change to src.interfaces.queue-backend can't break src.types.job-progress.
Position
Below the diagonal: src.interfaces.queue-backend uses a module listed above it, which is the healthy direction.
src.interfaces.queue-backend uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.interfaces.queue-backend, while a change to src.interfaces.queue-backend can't break src.interfaces.job-json.
Position
Below the diagonal: src.interfaces.queue-backend uses a module listed above it, which is the healthy direction.
src.interfaces.queue-backend uses src.interfaces.minimal-job, so a change to src.interfaces.minimal-job can break src.interfaces.queue-backend, while a change to src.interfaces.queue-backend can't break src.interfaces.minimal-job.
Position
Below the diagonal: src.interfaces.queue-backend uses a module listed above it, which is the healthy direction.
bullmq_official.flow_producer uses bullmq_official.keys, so a change to bullmq_official.keys can break bullmq_official.flow_producer, while a change to bullmq_official.flow_producer can't break bullmq_official.keys.
Position
Below the diagonal: bullmq_official.flow_producer uses a module listed above it, which is the healthy direction.
bullmq_official.flow_producer uses bullmq_official.options, so a change to bullmq_official.options can break bullmq_official.flow_producer, while a change to bullmq_official.flow_producer can't break bullmq_official.options.
Position
Below the diagonal: bullmq_official.flow_producer uses a module listed above it, which is the healthy direction.
bullmq_official.flow_producer uses bullmq_official.redis_connection, so a change to bullmq_official.redis_connection can break bullmq_official.flow_producer, while a change to bullmq_official.flow_producer can't break bullmq_official.redis_connection.
Position
Below the diagonal: bullmq_official.flow_producer uses a module listed above it, which is the healthy direction.
bullmq_official.flow_producer uses bullmq_official.job, so a change to bullmq_official.job can break bullmq_official.flow_producer, while a change to bullmq_official.flow_producer can't break bullmq_official.job.
Position
Below the diagonal: bullmq_official.flow_producer uses a module listed above it, which is the healthy direction.
bullmq_official.queue uses bullmq_official.keys, so a change to bullmq_official.keys can break bullmq_official.queue, while a change to bullmq_official.queue can't break bullmq_official.keys.
Position
Below the diagonal: bullmq_official.queue uses a module listed above it, which is the healthy direction.
bullmq_official.queue uses bullmq_official.types, so a change to bullmq_official.types can break bullmq_official.queue, while a change to bullmq_official.queue can't break bullmq_official.types.
Position
Below the diagonal: bullmq_official.queue uses a module listed above it, which is the healthy direction.
bullmq_official.queue uses bullmq_official.options, so a change to bullmq_official.options can break bullmq_official.queue, while a change to bullmq_official.queue can't break bullmq_official.options.
Position
Below the diagonal: bullmq_official.queue uses a module listed above it, which is the healthy direction.
bullmq_official.queue uses bullmq_official.redis_connection, so a change to bullmq_official.redis_connection can break bullmq_official.queue, while a change to bullmq_official.queue can't break bullmq_official.redis_connection.
Position
Below the diagonal: bullmq_official.queue uses a module listed above it, which is the healthy direction.
bullmq_official.queue uses bullmq_official.job, so a change to bullmq_official.job can break bullmq_official.queue, while a change to bullmq_official.queue can't break bullmq_official.job.
Position
Below the diagonal: bullmq_official.queue uses a module listed above it, which is the healthy direction.
bullmq_official.worker uses bullmq_official.keys, so a change to bullmq_official.keys can break bullmq_official.worker, while a change to bullmq_official.worker can't break bullmq_official.keys.
Position
Below the diagonal: bullmq_official.worker uses a module listed above it, which is the healthy direction.
bullmq_official.worker uses bullmq_official.types, so a change to bullmq_official.types can break bullmq_official.worker, while a change to bullmq_official.worker can't break bullmq_official.types.
Position
Below the diagonal: bullmq_official.worker uses a module listed above it, which is the healthy direction.
bullmq_official.worker uses bullmq_official.options, so a change to bullmq_official.options can break bullmq_official.worker, while a change to bullmq_official.worker can't break bullmq_official.options.
Position
Below the diagonal: bullmq_official.worker uses a module listed above it, which is the healthy direction.
bullmq_official.worker uses bullmq_official.redis_connection, so a change to bullmq_official.redis_connection can break bullmq_official.worker, while a change to bullmq_official.worker can't break bullmq_official.redis_connection.
Position
Below the diagonal: bullmq_official.worker uses a module listed above it, which is the healthy direction.
bullmq_official.worker uses bullmq_official.job, so a change to bullmq_official.job can break bullmq_official.worker, while a change to bullmq_official.worker can't break bullmq_official.job.
Position
Below the diagonal: bullmq_official.worker uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.interfaces.connection, so a change to src.interfaces.connection can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.interfaces.connection.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.types.job-progress, so a change to src.types.job-progress can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.types.job-progress.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.classes.redis-connection, so a change to src.classes.redis-connection can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.classes.redis-connection.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.interfaces.job-json.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.interfaces.minimal-job, so a change to src.interfaces.minimal-job can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.interfaces.minimal-job.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.redis-queue-backend uses src.interfaces.queue-backend, so a change to src.interfaces.queue-backend can break src.classes.redis-queue-backend, while a change to src.classes.redis-queue-backend can't break src.interfaces.queue-backend.
Position
Below the diagonal: src.classes.redis-queue-backend uses a module listed above it, which is the healthy direction.
src.interfaces.minimal-queue uses src.enums.telemetry-attributes, so a change to src.enums.telemetry-attributes can break src.interfaces.minimal-queue, while a change to src.interfaces.minimal-queue can't break src.enums.telemetry-attributes.
Position
Below the diagonal: src.interfaces.minimal-queue uses a module listed above it, which is the healthy direction.
src.interfaces.minimal-queue uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.interfaces.minimal-queue, while a change to src.interfaces.minimal-queue can't break src.interfaces.queue-options.
Position
Below the diagonal: src.interfaces.minimal-queue uses a module listed above it, which is the healthy direction.
src.interfaces.minimal-queue uses src.interfaces.queue-backend, so a change to src.interfaces.queue-backend can break src.interfaces.minimal-queue, while a change to src.interfaces.minimal-queue can't break src.interfaces.queue-backend.
Position
Below the diagonal: src.interfaces.minimal-queue uses a module listed above it, which is the healthy direction.
src.postgres.postgres-queue-backend uses src.types.job-progress, so a change to src.types.job-progress can break src.postgres.postgres-queue-backend, while a change to src.postgres.postgres-queue-backend can't break src.types.job-progress.
Position
Below the diagonal: src.postgres.postgres-queue-backend uses a module listed above it, which is the healthy direction.
src.postgres.postgres-queue-backend uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.postgres.postgres-queue-backend, while a change to src.postgres.postgres-queue-backend can't break src.interfaces.job-json.
Position
Below the diagonal: src.postgres.postgres-queue-backend uses a module listed above it, which is the healthy direction.
src.postgres.postgres-queue-backend uses src.interfaces.minimal-job, so a change to src.interfaces.minimal-job can break src.postgres.postgres-queue-backend, while a change to src.postgres.postgres-queue-backend can't break src.interfaces.minimal-job.
Position
Below the diagonal: src.postgres.postgres-queue-backend uses a module listed above it, which is the healthy direction.
src.postgres.postgres-queue-backend uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.postgres.postgres-queue-backend, while a change to src.postgres.postgres-queue-backend can't break src.interfaces.queue-options.
Position
Below the diagonal: src.postgres.postgres-queue-backend uses a module listed above it, which is the healthy direction.
src.postgres.postgres-queue-backend uses src.interfaces.queue-backend, so a change to src.interfaces.queue-backend can break src.postgres.postgres-queue-backend, while a change to src.postgres.postgres-queue-backend can't break src.interfaces.queue-backend.
Position
Below the diagonal: src.postgres.postgres-queue-backend uses a module listed above it, which is the healthy direction.
src.classes.queue-base uses src.enums.telemetry-attributes, so a change to src.enums.telemetry-attributes can break src.classes.queue-base, while a change to src.classes.queue-base can't break src.enums.telemetry-attributes.
Position
Below the diagonal: src.classes.queue-base uses a module listed above it, which is the healthy direction.
src.classes.queue-base uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.queue-base, while a change to src.classes.queue-base can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.queue-base uses a module listed above it, which is the healthy direction.
src.classes.queue-base uses src.interfaces.queue-backend, so a change to src.interfaces.queue-backend can break src.classes.queue-base, while a change to src.classes.queue-base can't break src.interfaces.queue-backend.
Position
Below the diagonal: src.classes.queue-base uses a module listed above it, which is the healthy direction.
src.classes.queue-base uses src.interfaces.minimal-queue, so a change to src.interfaces.minimal-queue can break src.classes.queue-base, while a change to src.classes.queue-base can't break src.interfaces.minimal-queue.
Position
Below the diagonal: src.classes.queue-base uses a module listed above it, which is the healthy direction.
src.postgres uses src.interfaces.relay-backend, so a change to src.interfaces.relay-backend can break src.postgres, while a change to src.postgres can't break src.interfaces.relay-backend.
Position
Below the diagonal: src.postgres uses a module listed above it, which is the healthy direction.
src.postgres uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.postgres, while a change to src.postgres can't break src.interfaces.job-json.
Position
Below the diagonal: src.postgres uses a module listed above it, which is the healthy direction.
src.postgres uses src.postgres.postgres-queue-backend, so a change to src.postgres.postgres-queue-backend can break src.postgres, while a change to src.postgres can't break src.postgres.postgres-queue-backend.
Position
Below the diagonal: src.postgres uses a module listed above it, which is the healthy direction.
src.classes.job-scheduler uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.job-scheduler, while a change to src.classes.job-scheduler can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.job-scheduler uses a module listed above it, which is the healthy direction.
src.classes.job-scheduler uses src.classes.queue-base, so a change to src.classes.queue-base can break src.classes.job-scheduler, while a change to src.classes.job-scheduler can't break src.classes.queue-base.
Position
Below the diagonal: src.classes.job-scheduler uses a module listed above it, which is the healthy direction.
src.classes.queue-events uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.queue-events, while a change to src.classes.queue-events can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.queue-events uses a module listed above it, which is the healthy direction.
src.classes.queue-events uses src.classes.redis-queue-backend, so a change to src.classes.redis-queue-backend can break src.classes.queue-events, while a change to src.classes.queue-events can't break src.classes.redis-queue-backend.
Position
Below the diagonal: src.classes.queue-events uses a module listed above it, which is the healthy direction.
src.classes.queue-events uses src.classes.queue-base, so a change to src.classes.queue-base can break src.classes.queue-events, while a change to src.classes.queue-events can't break src.classes.queue-base.
Position
Below the diagonal: src.classes.queue-events uses a module listed above it, which is the healthy direction.
src.classes.queue-getters uses src.classes.queue-base, so a change to src.classes.queue-base can break src.classes.queue-getters, while a change to src.classes.queue-getters can't break src.classes.queue-base.
Position
Below the diagonal: src.classes.queue-getters uses a module listed above it, which is the healthy direction.
src.classes.job uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.classes.job, while a change to src.classes.job can't break src.interfaces.job-json.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes.job uses src.interfaces.telemetry, so a change to src.interfaces.telemetry can break src.classes.job, while a change to src.classes.job can't break src.interfaces.telemetry.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes.job uses src.interfaces.minimal-job, so a change to src.interfaces.minimal-job can break src.classes.job, while a change to src.classes.job can't break src.interfaces.minimal-job.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes.job uses src.interfaces.worker-options, so a change to src.interfaces.worker-options can break src.classes.job, while a change to src.classes.job can't break src.interfaces.worker-options.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes.job uses src.interfaces.queue-backend, so a change to src.interfaces.queue-backend can break src.classes.job, while a change to src.classes.job can't break src.interfaces.queue-backend.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes.job uses src.classes.queue-events, so a change to src.classes.queue-events can break src.classes.job, while a change to src.classes.job can't break src.classes.queue-events.
Position
Below the diagonal: src.classes.job uses a module listed above it, which is the healthy direction.
src.classes uses src.interfaces.connection, so a change to src.interfaces.connection can break src.classes, while a change to src.classes can't break src.interfaces.connection.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes uses src.interfaces.relay-backend, so a change to src.interfaces.relay-backend can break src.classes, while a change to src.classes can't break src.interfaces.relay-backend.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes uses src.classes.redis-connection, so a change to src.classes.redis-connection can break src.classes, while a change to src.classes can't break src.classes.redis-connection.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.classes, while a change to src.classes can't break src.interfaces.job-json.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes uses src.classes.redis-relay-backend, so a change to src.classes.redis-relay-backend can break src.classes, while a change to src.classes can't break src.classes.redis-relay-backend.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes uses src.classes.redis-queue-backend, so a change to src.classes.redis-queue-backend can break src.classes, while a change to src.classes can't break src.classes.redis-queue-backend.
Position
Below the diagonal: src.classes uses a module listed above it, which is the healthy direction.
src.classes.flow-producer uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.classes.flow-producer, while a change to src.classes.flow-producer can't break src.interfaces.job-json.
Position
Below the diagonal: src.classes.flow-producer uses a module listed above it, which is the healthy direction.
src.classes.flow-producer uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.flow-producer, while a change to src.classes.flow-producer can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.flow-producer uses a module listed above it, which is the healthy direction.
src.classes.flow-producer uses src.classes.redis-queue-backend, so a change to src.classes.redis-queue-backend can break src.classes.flow-producer, while a change to src.classes.flow-producer can't break src.classes.redis-queue-backend.
Position
Below the diagonal: src.classes.flow-producer uses a module listed above it, which is the healthy direction.
src.classes.flow-producer uses src.classes.job, so a change to src.classes.job can break src.classes.flow-producer, while a change to src.classes.flow-producer can't break src.classes.job.
Position
Below the diagonal: src.classes.flow-producer uses a module listed above it, which is the healthy direction.
src.classes.queue uses src.types.job-progress, so a change to src.types.job-progress can break src.classes.queue, while a change to src.classes.queue can't break src.types.job-progress.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
src.classes.queue uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.classes.queue, while a change to src.classes.queue can't break src.interfaces.queue-options.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
src.classes.queue uses src.classes.redis-queue-backend, so a change to src.classes.redis-queue-backend can break src.classes.queue, while a change to src.classes.queue can't break src.classes.redis-queue-backend.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
src.classes.queue uses src.classes.job-scheduler, so a change to src.classes.job-scheduler can break src.classes.queue, while a change to src.classes.queue can't break src.classes.job-scheduler.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
src.classes.queue uses src.classes.queue-getters, so a change to src.classes.queue-getters can break src.classes.queue, while a change to src.classes.queue can't break src.classes.queue-getters.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in src.classes.queue uses a type in src.classes.job.
The types involved
src.classes.queue.Queue → src.classes.job.Job
Direction
src.classes.queue uses src.classes.job, so a change to src.classes.job can break src.classes.queue, while a change to src.classes.queue can't break src.classes.job.
Position
Below the diagonal: src.classes.queue uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.interfaces.job-json, so a change to src.interfaces.job-json can break src.classes.worker, while a change to src.classes.worker can't break src.interfaces.job-json.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.interfaces.telemetry, so a change to src.interfaces.telemetry can break src.classes.worker, while a change to src.classes.worker can't break src.interfaces.telemetry.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.interfaces.worker-options, so a change to src.interfaces.worker-options can break src.classes.worker, while a change to src.classes.worker can't break src.interfaces.worker-options.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.classes.redis-queue-backend, so a change to src.classes.redis-queue-backend can break src.classes.worker, while a change to src.classes.worker can't break src.classes.redis-queue-backend.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.classes.queue-base, so a change to src.classes.queue-base can break src.classes.worker, while a change to src.classes.worker can't break src.classes.queue-base.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.classes.worker uses src.classes.job-scheduler, so a change to src.classes.job-scheduler can break src.classes.worker, while a change to src.classes.worker can't break src.classes.job-scheduler.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in src.classes.worker uses a type in src.classes.job.
The types involved
src.classes.worker.Worker → src.classes.job.Job
Direction
src.classes.worker uses src.classes.job, so a change to src.classes.job can break src.classes.worker, while a change to src.classes.worker can't break src.classes.job.
Position
Below the diagonal: src.classes.worker uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.interfaces.queue-options, so a change to src.interfaces.queue-options can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.interfaces.queue-options.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.interfaces.worker-options, so a change to src.interfaces.worker-options can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.interfaces.worker-options.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.classes.queue-events, so a change to src.classes.queue-events can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.classes.queue-events.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.classes.flow-producer, so a change to src.classes.flow-producer can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.classes.flow-producer.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.classes.queue, so a change to src.classes.queue can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.classes.queue.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
src.utils.with-backend uses src.classes.worker, so a change to src.classes.worker can break src.utils.with-backend, while a change to src.utils.with-backend can't break src.classes.worker.
Position
Below the diagonal: src.utils.with-backend uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 67.9 · Adequate · gated by R3 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
42
High / Critical
A03:2025 — Software Supply Chain Failures
22
High / Critical
A02:2025 — Security Misconfiguration
17
Medium
Roadmap
Top priorities: Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies; Move each table the code creates at runtime into the versioned migrations the repository already applies; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
Bring the 68 bodies over 15 down to 15 or less in Cognitive Complexity — start with JobScheduler.upsertJobScheduler (cognitive 54), job_scheduler._transform_scheduler_data (cognitive 45), Worker.constructor (cognitive 40).
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 — 50
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 — 487
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 — 78
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 18
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 55 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 55 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, 610 of 615 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the dependency install for the repository root failed in the analyzer sandbox (yarn install v1.22.22), so the suite never ran. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a coverage step in CI (`coverage` → `vitest run --no-file-parallelism --coverage`), uploaded by `coverallsapp/github-action` shows coverage is measured in your own CI.
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 79 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 201 test source file(s) (.ts, .rs, .py, .exs, .js, .cjs, .mjs) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: this repository's test suite spans .NET and JavaScript/TypeScript, and neither half could not be re-run — unit: not included — its runs surfaced no test; JavaScript/TypeScript (vitest via `yarn install --frozen-lockfile --ignore-scripts` in the repository root): not included — the dependency install for the repository root failed in the analyzer sandbox (yarn install v1.22.22), so the suite never ran. No partial figure is published as if it were the whole: reliability is excluded from the score rather than counted as a near-zero.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (yarn install v1.22.22), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D12 Dependency Hygiene — 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
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 package.json, but the licence verdict published here was taken over its NuGet package 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.
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 composer.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Composer dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Cargo manifest, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Cargo dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 an Elixir mix.exs/mix.lock (Hex), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Mix dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D17 Explicit Debt — 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 C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'dotnet/src/BullMQ/BullMQ.csproj' with message: No Lua command scripts found under 'Commands/'. Run 'yarn copy:lua:dotnet' from the repository root before building; these shared scripts must be embedded in the released package.
D17 Explicit Debt — 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 7 deducted marker(s) and the 0.9/KLoC density on this row were taken over this repository's .NET projects ALONE: .ts (26,078 lines, 38% of production source), .rs (12,534 lines, 18% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 97 task marker(s) (TODO/FIXME/HACK/XXX) across 20 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — 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. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `docs/.vitepress/theme/index.ts`, `php/src/Queue.php` 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.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 19 further occurrence(s) are not listed individually; the score already reflects all 59.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 92 further occurrence(s) are not listed individually; the score already reflects all 132.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X28 Index access outside its own emptiness guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
Repo exclusion declarations: 8 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
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.
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 Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
30 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ioredis-client.createIORedisClient at 42. A further 2 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 QueueEvent::name at 20 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: rust/src/queue_events.rs (QueueEvent::name at 20). 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.
+ 22 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with ioredis-client.createIORedisClient (cyclomatic 42), JobScheduler.upsertJobScheduler (cyclomatic 36), JobScheduler.upsertJobScheduler (cyclomatic 32). — 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 3 together lifts Cyclomatic Complexity from 6.9 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 50 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 68 bodies over 15 down to 15 or less in Cognitive Complexity — start with JobScheduler.upsertJobScheduler (cognitive 54), job_scheduler._transform_scheduler_data (cognitive 45), Worker.constructor (cognitive 40). — 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 68 together lifts Cognitive Complexity from 6.7 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.5 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 FileTooLong finding(s) in God Classes — start with redis-queue-backend.ts, queue.rs, worker.rs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 21 TooManyMethods finding(s) in God Classes — start with redis-queue-backend.ts, queue.rs, postgres-queue-backend.ts. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 12 ClassTooLong finding(s) in God Classes — start with redis-queue-backend.ts, queue.rs, postgres-queue-backend.ts. — One of this dimension's main actionable groups (12 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.
79 duplicated block group(s) detected. 4.2 % of the production lines (2,905 of 68,820) are in a reported copy. A further 45 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 (36% 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.
+ 71 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with job.rs (3), job.ex, scripts.py. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with worker.ex (2), postgres.ex, flow_producer.rs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with redis.ex, queue.ex, job.rs. — 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 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
6 production modules (Cargo+npm+Python+Composer+OTP), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 5 of the 6 (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).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 79 tests. Measured on the C# suite only — at least 201 test source file(s) (.ts, .rs, .py, .exs, .js, .cjs, .mjs) went unread, so its test quality is unmeasured and is not in these counts.
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 108 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 7 direct `PackageReference`(s), and 101 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, composer.json, a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Cargo manifest and an Elixir mix.exs/mix.lock (Hex), and the licences of those dependency graphs 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: src/classes/worker.ts (8×19=152); src/classes/bun-redis-client.ts (4×20=80) Repeated repair below the complexity floor: python/bullmq/scripts.py (5 of 9 changes were fixes); rust/src/scripts.rs (3 of 5 changes were fixes); src/postgres/postgres-connection.ts (3 of 5 changes were fixes)
Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with scripts.py, scripts.rs, postgres-connection.ts. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with worker.ts, bun-redis-client.ts. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
1 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is dotnet/src/BullMQ/Postgres/PostgresConnection.cs. Counted over 21 of the 26 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
7 deducted debt markers + unmeasured dead symbols across 5999 LoC in the .NET projects (0.9/KLoC) → score 8.2. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .ts, .rs (57% of production source) was not read, and carries at least 97 uncounted task marker(s) in 20 file(s).
Resolve the 7 EmptyCatchBlock finding(s) in Explicit Debt — start with PostgresConnection.cs (5), QueueEvents.cs (2). — One of this dimension's main actionable groups (7 issue-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.
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.
1 naming inconsistencies among 183 declarations measured against a convention their peers follow.
`ProcessJob` returns an awaitable but lacks the `Async` suffix its 182 peers carrydotnet/src/BullMQ/Worker.cs:273
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged
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.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the names · ×2dotnet/src/BullMQ/Options.cs:51
What to do
Resolve the 16 redundant comment finding(s) in Comment Value — start with clean.redis.test.ts (4), job_scheduler.test.ts (3), deduplication.test.ts (2). — One of this dimension's main actionable groups (16 recommendation-level).
Detailed fixes: d24_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).
42 finding(s): 0 critical, 30 high, 12 medium, 0 low. 25 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) — `docs/.vitepress/theme/index.ts` (line 30), `dotnet/scripts/test.sh` (line 50), `php/src/Queue.php` (line 28) — 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 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).
No action in Static Analysis (SAST) — all 24 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (24 issue-level, 0 of them charged here).
No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 9 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
Resolve the 9 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8), REDACTED. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 2 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 17 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (17). — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 21 of the 26 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with child-processor.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 12 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.
The namespaces BullMQ ↔ BullMQ.Redis depend on each other. The lightest dependency in the cycle is BullMQ → BullMQ.Redis (BullMQ.RedisBackend → BullMQ.Redis.RedisConnection, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — dotnet/src/BullMQ/RedisBackend.cs:1
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`IQueueBackend` declares 67 members: `WaitUntilReadyAsync`, `CloseAsync`, `DisconnectAsync`, `Closing`, `SetNameAsync`, `ForQueue`, `MinimumBlockTimeout`, `Capabilities`, `QualifiedName`, `Keys`, `ToKey`, `ClientName`, `AddJobAsync`, `AddJobsAsync`, `AddFlowAsync`, `MoveToActiveAsync`, `MoveToCompletedAsync`, `MoveToFailedAsync`, `MoveToDelayedAsync`, `MoveToWaitingChildrenAsync`, `RetryJobAsync`, `ReprocessJobAsync`, `PromoteAsync`, `MoveStalledJobsToWaitAsync`, `RetryJobsAsync`, `PromoteJobsAsync`, `PauseAsync`, `DrainAsync`, `CleanJobsInSetAsync`, `ObliterateAsync`, `RemoveAsync`, `ExtendLockAsync`, `ExtendLocksAsync`, `UpdateDataAsync`, `UpdateProgressAsync`, `ChangePriorityAsync`, `AddLogAsync`, `GetStateAsync`, `IsJobInStateAsync`, `GetJobDataAsync`, and 27 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — dotnet/src/BullMQ/IQueueBackend.cs:15
`IRedisClient` declares 44 required operations: `connect`, `disconnect`, `quit`, `duplicate`, `on`, `once`, `removeListener`, `off`, `emit`, `setMaxListeners`, `getMaxListeners`, `removeAllListeners`, `defineCommand`, `runCommand`, `multi`, `pipeline`, `hgetall`, `hget`, `hmget`, `hset`, `hdel`, `hexists`, `get`, `set`, `del`, `zrange`, `zrevrange`, `zcard`, `zscore`, `lrange`, `llen`, `ltrim`, `lpos`, `smembers`, `xadd`, `xread`, `xtrim`, `bzpopmin`, `info`, `clientSetName`, and 4 more. 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. — src/interfaces/redis-client.ts:17
`IQueueBackend` declares 85 required operations: `waitUntilReady`, `close`, `disconnect`, `setName`, `on`, `once`, `removeListener`, `forQueue`, `toKey`, `parseNodeKey`, `clientName`, `addJob`, `addJobs`, `addFlow`, `addJobScheduler`, `moveToActive`, `moveToCompleted`, `moveToFailed`, `moveToDelayed`, `moveToWaitingChildren`, `moveJobFromActiveToWait`, `retryJob`, `retryFinishedJob`, `promote`, `moveStalledJobsToWait`, `retryFinishedJobs`, `promoteJobs`, `pause`, `drain`, `cleanJobsByState`, `obliterate`, `removeOrphanedJobs`, `extendLock`, `extendLocks`, `updateData`, `updateProgress`, `addLog`, `clearLogs`, `changeDelay`, `changePriority`, and 45 more. 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. — src/interfaces/queue-backend.ts:61
`IRelayBackend` declares 20 required operations: `waitUntilReady`, `close`, `registerNode`, `heartbeat`, `unregisterNode`, `sweep`, `subscribe`, `removeEndpoint`, `publish`, `deleteRetained`, `readInbox`, `trimInbox`, `getCounts`, `getNodes`, `getSubscriptions`, `getPatterns`, `getRetained`, `getNamespaces`, `getNodeConnections`, `interruptInbox`. 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. — src/interfaces/relay-backend.ts:148
`NodeRedisRawClient` declares 48 required operations: `on`, `connect`, `destroy`, `quit`, `duplicate`, `scriptLoad`, `evalSha`, `eval`, `multi`, `hGetAll`, `hGet`, `hmGet`, `hSet`, `hDel`, `hExists`, `get`, `set`, `del`, `zRange`, `zCard`, `zScore`, `zAdd`, `zRem`, `lRange`, `lLen`, `lTrim`, `lPos`, `lPush`, `rPop`, `sMembers`, `sAdd`, `sCard`, `xAdd`, `xRead`, `xTrim`, `xLen`, `xRevRange`, `bzPopMin`, `info`, `clientSetName`, and 8 more. 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. — src/classes/node-redis-client.ts:67
`QueueEventsListener` declares 18 required operations: `active`, `added`, `cleaned`, `completed`, `deduplicated`, `delayed`, `drained`, `duplicated`, `error`, `failed`, `paused`, `progress`, `removed`, `resumed`, `retries-exhausted`, `stalled`, `waiting`, `waiting-children`. 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. — src/classes/queue-events.ts:16
`Backend` declares 58 abstract methods: `waitUntilReady`, `close`, `disconnect`, `setName`, `forQueue`, `minimumBlockTimeout`, `capabilities`, `qualifiedName`, `keys`, `toKey`, `clientName`, `addJob`, `addJobs`, `addFlow`, `moveToActive`, `moveToCompleted`, `moveToFailed`, `moveToDelayed`, `moveToWaitingChildren`, `retryJob`, `reprocessJob`, `promote`, `moveStalledJobsToWait`, `retryJobs`, `promoteJobs`, `pause`, `drain`, `cleanJobsInSet`, `obliterate`, `remove`, `extendLock`, `extendLocks`, `updateData`, `updateProgress`, `changePriority`, `addLog`, `getState`, `isJobInState`, `getJobData`, `getJobLogs`, and 18 more. Counted over its `@abstractmethod`s (and abstract properties), once per name; concrete methods are helpers an implementer inherits, not a burden, and `_`-prefixed members are not counted. 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. — python/bullmq/backend.py:33
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in 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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
docs/gitbook/guide/relay/backends.md names Redis 5, but the manifest declares `redis` 6.3.1. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/gitbook/guide/relay/backends.md:13
What to do
Reconcile the README with reality: docs/gitbook/guide/relay/backends.md names Redis 5, but the manifest declares `redis` 6.3.1.
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 & versioning9.0 / 10Exemplary✓ Tool-verified
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.
`BullMQ.JobScheduler` (dotnet/src/BullMQ/JobScheduler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/JobScheduler.cs:14
`BullMQ.KeepJobs` (dotnet/src/BullMQ/Options.cs:187) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/Options.cs:187
`BullMQ.Postgres.PostgresConnection` (dotnet/src/BullMQ/Postgres/PostgresConnection.cs:45) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:45
`BullMQ.Postgres.SqlLoader` (dotnet/src/BullMQ/Postgres/SqlLoader.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/Postgres/SqlLoader.cs:15
`BullMQ.Redis.LuaScripts` (dotnet/src/BullMQ/Redis/LuaScripts.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/Redis/LuaScripts.cs:18
`BullMQ.Version` (dotnet/src/BullMQ/Version.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — dotnet/src/BullMQ/Version.cs:4
What to do
Make `BullMQ.JobScheduler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BullMQ.KeepJobs` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BullMQ.Postgres.PostgresConnection` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BullMQ.Postgres.SqlLoader` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BullMQ.Redis.LuaScripts` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BullMQ.Version` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
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.
Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
This repository evolves its schema with versioned migrations, but a CREATE TABLE statement here creates schema at runtime outside them — structure no migration created and the migration history does not describe, so a later migration that touches it fails on a fresh environment and the environments drift apart. Create it in a migration instead. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:186
What to do
Move each table the code creates at runtime into the versioned migrations the repository already applies.
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.
`fs.existsSync` in `transpileScripts` 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. — scripts/generateRawScripts.ts:17
`fs.mkdirSync` in `transpileScripts` 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. — scripts/generateRawScripts.ts:18
`await using … = await OpenWithRetryAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:141
`await using … = await conn.BeginTransactionAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:160
`await using … = new NpgsqlCommand("SELECT current_setting('server_version_num')", c...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:164
`await using … = new NpgsqlCommand("SELECT pg_advisory_xact_lock($1, hashtext($2))",...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:175
`await using … = new NpgsqlCommand( "SELECT COALESCE(MAX(version), 0)::int FROM bull...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:191
`await using … = new NpgsqlCommand( "INSERT INTO bullmq_migration (version, name) VA...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:206
`await using … = new NpgsqlCommand(sql, conn, tx)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:219
`await using … = new NpgsqlCommand(sql, conn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:245
`await using … = await cmd.ExecuteReaderAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:258
`await using … = new NpgsqlCommand( "SELECT set_config('application_name', $1, false...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:372, dotnet/src/BullMQ/Postgres/PostgresConnection.cs:480
`await using … = new NpgsqlCommand($"LISTEN {JobsChannel}", _listenConn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:381
`await using … = new NpgsqlCommand($"LISTEN {EventsChannel}", _eventsConn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — dotnet/src/BullMQ/Postgres/PostgresConnection.cs:489
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.
11 duplicated blocks under src/ have copies in at least two of the sibling directories classes, interfaces, postgres, utils — 5 of them are reported below, and 6 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 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 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 11 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. — src/classes/redis-relay-backend.ts:140
src/postgres/postgres-queue-backend.ts:812 · src/postgres/postgres-queue-backend.ts:880 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/postgres/postgres-queue-backend.ts:812
src/classes/bun-redis-client.ts:938 · src/classes/valkey-glide-client.ts:861 — 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. — src/classes/bun-redis-client.ts:938
src/classes/redis-relay-backend.ts:140 · src/postgres/postgres-relay-backend.ts:98 — the two spans are one implementation copied and then locally edited — 152 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. — src/classes/redis-relay-backend.ts:140
src/classes/queue-events-producer.ts:19 · src/classes/queue.ts:163 — 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. — src/classes/queue-events-producer.ts:19
src/classes/job.ts:422 · src/classes/redis-queue-backend.ts:3032 — 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. — src/classes/job.ts:422
src/classes/bun-redis-client.ts:597 · src/classes/node-redis-client.ts:427 — 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. — src/classes/bun-redis-client.ts:597
src/classes/bun-redis-client.ts:1290 · src/classes/bun-redis-client.ts:1319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/bun-redis-client.ts:1290
src/classes/bun-redis-client.ts:495 · src/classes/valkey-glide-client.ts:619 — 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. — src/classes/bun-redis-client.ts:495
src/classes/redis-queue-backend.ts:496 · src/classes/redis-queue-backend.ts:529 · src/classes/redis-queue-backend.ts:598 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/redis-queue-backend.ts:496
src/classes/node-redis-client.ts:965 · src/classes/node-redis-client.ts:996 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/node-redis-client.ts:965
src/classes/queue.ts:263 · src/classes/worker.ts:602 — 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. — src/classes/queue.ts:263
src/classes/redis-queue-backend.ts:298 · src/postgres/postgres-queue-backend.ts:360 — the two spans are one implementation copied and then locally edited — 91 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. — src/classes/redis-queue-backend.ts:298
src/classes/redis-queue-backend.ts:1307 · src/classes/redis-queue-backend.ts:1782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/redis-queue-backend.ts:1307
src/classes/child-processor.ts:243 · src/classes/child-processor.ts:269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/child-processor.ts:243
src/classes/ioredis-client.ts:155 · src/classes/ioredis-client.ts:172 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/ioredis-client.ts:155
src/classes/redis-queue-backend.ts:921 · src/classes/redis-queue-backend.ts:974 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/redis-queue-backend.ts:921
src/classes/job-scheduler.ts:526 · src/classes/job-scheduler.ts: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. — src/classes/job-scheduler.ts:526
src/classes/bun-redis-client.ts:1456 · src/classes/node-redis-client.ts:1074 — 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. — src/classes/bun-redis-client.ts:1456
src/classes/child-processor.ts:299 · src/classes/child-processor.ts:323 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/child-processor.ts:299
src/classes/flow-producer.ts:418 · src/classes/job-scheduler.ts:213 — 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. — src/classes/flow-producer.ts:418
src/classes/valkey-glide-client.ts:181 · src/classes/valkey-glide-client.ts:238 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/valkey-glide-client.ts:181
src/classes/valkey-glide-client.ts:793 · src/classes/valkey-glide-client.ts:807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/valkey-glide-client.ts:793
src/postgres/postgres-queue-backend.ts:1825 · src/postgres/postgres-queue-backend.ts:1839 — 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. — src/postgres/postgres-queue-backend.ts:1825
src/classes/bun-redis-client.ts:763 · src/classes/bun-redis-client.ts:1266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/bun-redis-client.ts:763
src/classes/bun-redis-client.ts:845 · src/classes/bun-redis-client.ts:870 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/bun-redis-client.ts:845
src/classes/ioredis-client.ts:376 · src/classes/ioredis-client.ts:391 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/ioredis-client.ts:376
src/classes/queue.ts:633 · src/classes/queue.ts:654 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/queue.ts:633
src/classes/queue.ts:888 · src/classes/queue.ts:918 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/queue.ts:888
src/classes/redis-queue-backend.ts:734 · src/postgres/postgres-queue-backend.ts:670 — 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. — src/classes/redis-queue-backend.ts:734
src/classes/redis-queue-backend.ts:2253 · src/postgres/postgres-queue-backend.ts:1901 — 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. — src/classes/redis-queue-backend.ts:2253
src/classes/bun-redis-client.ts:1362 · src/classes/node-redis-client.ts:1043 — 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. — src/classes/bun-redis-client.ts:1362
src/classes/redis-queue-backend.ts:1348 · src/classes/redis-queue-backend.ts:1390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/redis-queue-backend.ts:1348
src/classes/redis-queue-backend.ts:2491 · src/classes/redis-queue-backend.ts:2514 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/redis-queue-backend.ts:2491
src/classes/valkey-glide-client.ts:1164 · src/classes/valkey-glide-client.ts:1199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/valkey-glide-client.ts:1164
src/classes/bun-redis-client.ts:862 · src/classes/bun-redis-client.ts:885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/classes/bun-redis-client.ts:862
src/classes/bun-redis-client.ts:1375 · src/classes/node-redis-client.ts:1056 — 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. — src/classes/bun-redis-client.ts:1375
src/classes/node-redis-client.ts:502 · src/classes/node-redis-client.ts:726 · src/classes/node-redis-client.ts:773 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/node-redis-client.ts:502
src/classes/node-redis-client.ts:602 · src/classes/node-redis-client.ts:625 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/classes/node-redis-client.ts:602
src/classes/redis-queue-backend.ts:2065 · src/classes/redis-relay-backend.ts:418 — the two spans are one implementation copied and then locally edited — 69 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. — src/classes/redis-queue-backend.ts:2065
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.
vitest.postgres.global-setup.ts:15 imports tests/postgres/utils/postgres-url.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. — vitest.postgres.global-setup.ts:15
What to do
Fix the listed violations: move the shared test helper into a source directory production code may depend on (1 row).
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.
executeImmediately has cyclomatic complexity 102 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/valkey-glide-client.test.ts:90
constructor has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/relay.ts:157
addJob 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. — src/postgres/postgres-queue-backend.ts:565
toBatchEntry has cyclomatic complexity 20 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:646
getRedisVersionAndType has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-connection.ts:820
rowToJobJson has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:124
connect has cyclomatic complexity 17 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/bun-redis-client.ts:339
resolveDependencies has cyclomatic complexity 16 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:175
getDependencies has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:1711
mapSchedulerRow has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:187
removeOrphanedJobs has cyclomatic complexity 14 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. — src/classes/redis-queue-backend.ts:2384
(anonymous) has cyclomatic complexity 14 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/valkey-glide-client.ts:1139
(anonymous) has cyclomatic complexity 14 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/job-scheduler.ts:210
loadScripts has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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:463
isIRedisClient has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/ioredis-client.ts:415
getDependencies has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-queue-backend.ts:2597
readInbox has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-relay-backend.ts:243
readLoop has cyclomatic complexity 12 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. — src/classes/relay.ts:616
paginate has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-queue-backend.ts:2261
moveToCompleted has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:807
moveToFailed has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:874
moveToDelayed has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/postgres/postgres-queue-backend.ts:942
isJobInState has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-queue-backend.ts:450
runCommand has cyclomatic complexity 11 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/node-redis-client.ts:469
(anonymous) has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/relay.ioredis.test.ts:616
referenceParse has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/relay.test.ts:23
(anonymous) has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/flow-producer.ts:410
addJobToTransaction has cyclomatic complexity 11 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/classes/redis-queue-backend.ts:639
(anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — tests/postgres/operations.test.ts:57
Do you agree with this assessment?
R3 · Large Files3.7 / 10Weak✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
src/classes/redis-queue-backend.ts has 2766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/redis-queue-backend.ts:1
src/postgres/postgres-queue-backend.ts has 2131 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/postgres/postgres-queue-backend.ts:1
src/classes/worker.ts has 1487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/worker.ts:1
src/classes/bun-redis-client.ts has 1329 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/bun-redis-client.ts:1
src/classes/job.ts has 1265 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/job.ts:1
src/classes/valkey-glide-client.ts has 1144 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/valkey-glide-client.ts:1
src/classes/node-redis-client.ts has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/node-redis-client.ts:1
src/classes/queue.ts has 900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/queue.ts:1
src/classes/redis-connection.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/redis-connection.ts:1
src/interfaces/queue-backend.ts has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/interfaces/queue-backend.ts:1
src/classes/relay.ts has 701 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/relay.ts:1
src/classes/queue-getters.ts has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/queue-getters.ts:1
src/classes/flow-producer.ts has 643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/flow-producer.ts:1
REDACTED has 573 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
src/classes/redis-relay-backend.ts has 570 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/redis-relay-backend.ts:1
src/classes/job-scheduler.ts has 504 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/job-scheduler.ts:1
src/postgres/postgres-connection.ts has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/postgres/postgres-connection.ts:1
src/utils/index.ts has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/utils/index.ts:1
src/postgres/postgres-relay-backend.ts has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/postgres/postgres-relay-backend.ts:1
src/classes/ioredis-client.ts has 410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/classes/ioredis-client.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.3 / 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. (×4) — elixir/scripts/updateVersion.js:1, php/scripts/updateVersion.js:1, vitest.postgres.global-setup.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.8 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
253 file(s) (~85016 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: src/postgres/sql-loader.ts imports './sql-scripts', 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.
1 file(s) (~35 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — elixir
1 file(s) (~30 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — php
This script imports the product ('../src/classes/relay'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no Dockerfile, no other file under benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node benchmark/relay-benchmark.ts`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it. — benchmark/relay-benchmark.ts
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×4) — src/classes/queue-getters.ts:13, src/interfaces/flow-job.ts:18, tests/types/backend-connections.ts:176, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×3) — src/classes/valkey-glide-client.ts:61, mocha.setup.ts:1, mocha.setup.ts:2
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×7) — package.json:116, package.json:117, package.json:120, …
Declared in dotnet/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — dotnet/package.json:12, dotnet/package.json:13, dotnet/package.json:16, …
Declared in elixir/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. (×5) — elixir/package.json:16, elixir/package.json:18, elixir/package.json:19, …
Declared in php/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — php/package.json:15, php/package.json:16, php/package.json:19, …
Declared in python/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. (×5) — python/package.json:18, python/package.json:19, python/package.json:22, …
Declared in rust/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — rust/package.json:11, rust/package.json:12, rust/package.json:15, …
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.
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 — 4 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 10 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 — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 70 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — 1 markup document under demonstration, documentation or developer-tool trees (or modules the build marks non-production) but none in the product; no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — those pages are demos or docs for the code, not something this tier can boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not measured — polyglot suite, one half not re-run
D12 Dependency Hygiene — Dependency hygiene not measured
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .ex, .exs, .lua, .mts, .php, .py, .rs, .ts, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .lua, .mts, .php, .py, .rs, .ts, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured — .NET and JavaScript/TypeScript suite
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 2 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
IC1 Incompleteness & stubs — IC1 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
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 yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
X1 Async correctness — X1 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — X18 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — X2 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — X21 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X22 Contradicted release guard — X22 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — X27 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X28 Index access outside its own emptiness guard — X28 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X29 Per-element action decided by a fixed element — X29 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X3 Exception handling — X3 reached only 8% of this repository's production lines — typescript (26,334 lines), elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines), javascript (240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X5 Nullable reference types — X5 reached only 44% of this repository's production lines — elixir (15,609 lines), rust (12,534 lines), python (6,473 lines), lua (5,374 lines), php (1,631 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
EmptyCatchBlock dotnet/src/BullMQ/Postgres/PostgresConnection.cs:330— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/Postgres/PostgresConnection.cs:437— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/Postgres/PostgresConnection.cs:460— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/Postgres/PostgresConnection.cs:514— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/Postgres/PostgresConnection.cs:560— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/QueueEvents.cs:241— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock dotnet/src/BullMQ/QueueEvents.cs:265— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Namespace dependency cycle dotnet/src/BullMQ/RedisBackend.cs:1— The namespaces BullMQ ↔ BullMQ.Redis depend on each other. The lightest dependency in the cycle is BullMQ → BullMQ.Redis (BullMQ.RedisBackend → BullMQ.Redis.RedisConnection, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Unlisted import '@valkey/valkey-glide' src/classes/valkey-glide-client.ts:61— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'chai-as-promised' mocha.setup.ts:2— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
FileTooLong: classes/redis-queue-backend.ts src/classes/redis-queue-backend.ts— FileTooLong — 1981 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: RedisQueueBackend (124-2982). The bar is 500 significant lines; this is 1481 over it, 3.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/queue.rs rust/src/queue.rs— FileTooLong — 1977 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: Queue (2 blocks, 71-2900). The bar is 500 significant lines; this is 1477 over it, 3.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/worker.rs rust/src/worker.rs— FileTooLong — 1573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: Worker (3 blocks, 174-2466). The bar is 500 significant lines; this is 1073 over it, 3.15× 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: postgres/postgres-queue-backend.ts src/postgres/postgres-queue-backend.ts— FileTooLong — 1444 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: PostgresQueueBackend (251-2300). The bar is 500 significant lines; this is 944 over it, 2.89× 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: bullmq/scripts.ex elixir/lib/bullmq/scripts.ex— FileTooLong — 1343 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 78 functions. The bar is 500 significant lines; this is 843 over it, 2.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bullmq/queue.ex elixir/lib/bullmq/queue.ex— FileTooLong — 1021 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 61 functions. The bar is 500 significant lines; this is 521 over it, 2.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/job.rs rust/src/job.rs— FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: Job (2 blocks, 44-1523). The bar is 500 significant lines; this is 492 over it, 1.98× 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: classes/worker.ts src/classes/worker.ts— FileTooLong — 916 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Worker (200-1659). The bar is 500 significant lines; this is 416 over it, 1.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: classes/valkey-glide-client.ts src/classes/valkey-glide-client.ts— FileTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: ValkeyGlideAdapter (322-1220). The bar is 500 significant lines; this is 333 over it, 1.67× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/flow_producer.rs rust/src/flow_producer.rs— FileTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: FlowProducer (2 blocks, 224-1216). The bar is 500 significant lines; this is 293 over it, 1.59× 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: classes/bun-redis-client.ts src/classes/bun-redis-client.ts— FileTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: BunRedisAdapter (123-1233). The bar is 500 significant lines; this is 291 over it, 1.58× 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: BullMQ/RedisBackend.cs dotnet/src/BullMQ/RedisBackend.cs— FileTooLong — 759 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 259 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: backends/redis.ex elixir/lib/bullmq/backends/redis.ex— FileTooLong — 743 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 87 functions. The bar is 500 significant lines; this is 243 over it, 1.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: classes/job.ts src/classes/job.ts— FileTooLong — 711 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Job (64-1439). The bar is 500 significant lines; this is 211 over it, 1.42× 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: backends/postgres_backend.py python/bullmq/backends/postgres_backend.py— FileTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 187 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: classes/node-redis-client.ts src/classes/node-redis-client.ts— FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: NodeRedisAdapter (192-940). The bar is 500 significant lines; this is 145 over it, 1.29× 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: bullmq/scripts.py python/bullmq/scripts.py— FileTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 132 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: BullMQ/PostgresBackend.cs dotnet/src/BullMQ/PostgresBackend.cs— FileTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 122 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bullmq/job.ex elixir/lib/bullmq/job.ex— FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 52 functions. The bar is 500 significant lines; this is 27 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: classes/redis-connection.ts src/classes/redis-connection.ts— FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: RedisConnection (153-910). The bar is 500 significant lines; this is 27 over it, 1.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/options.rs rust/src/options.rs— FileTooLong — 520 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 20 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bullmq/job_scheduler.ex elixir/lib/bullmq/job_scheduler.ex— FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
TooManyMethods: RedisQueueBackend src/classes/redis-queue-backend.ts:124— TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× the bar. Most of these members implement queue-backend.IQueueBackend (82 of 121 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Queue rust/src/queue.rs:71— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PostgresQueueBackend src/postgres/postgres-queue-backend.ts:251— TooManyMethods — 93 methods. The bar is 30 methods; this is 63 over it, 3.10× the bar. Most of these members implement queue-backend.IQueueBackend (82 of 93 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: RedisBackend dotnet/src/BullMQ/RedisBackend.cs— TooManyMethods — 755 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PostgresBackend dotnet/src/BullMQ/PostgresBackend.cs— TooManyMethods — 618 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PostgresBackend python/bullmq/backends/postgres_backend.py:211— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Job rust/src/job.rs:44— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ValkeyGlideAdapter src/classes/valkey-glide-client.ts:322— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BunRedisAdapter src/classes/bun-redis-client.ts:123— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Scripts python/bullmq/scripts.py:26— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RedisBackend python/bullmq/backends/redis_backend.py:58— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Queue python/bullmq/queue.py:11— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Backend python/bullmq/backend.py:33— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Job src/classes/job.ts:64— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NodeRedisAdapter src/classes/node-redis-client.ts:192— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. Most of these members implement redis-client.IRedisClient (36 of 51 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Worker src/classes/worker.ts:200— 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.
TooManyMethods: Worker rust/src/worker.rs:174— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Queue dotnet/src/BullMQ/Queue.cs— TooManyMethods — 183 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: QueueGetters src/classes/queue-getters.ts:33— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Queue src/classes/queue.ts:140— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Queue php/src/Queue.php:23— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:141— `await using … = await OpenWithRetryAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:160— `await using … = await conn.BeginTransactionAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:164— `await using … = new NpgsqlCommand("SELECT current_setting('server_version_num')", c...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:175— `await using … = new NpgsqlCommand("SELECT pg_advisory_xact_lock($1, hashtext($2))",...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:191— `await using … = new NpgsqlCommand( "SELECT COALESCE(MAX(version), 0)::int FROM bull...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:206— `await using … = new NpgsqlCommand( "INSERT INTO bullmq_migration (version, name) VA...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:219— `await using … = new NpgsqlCommand(sql, conn, tx)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:245— `await using … = new NpgsqlCommand(sql, conn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:258— `await using … = await cmd.ExecuteReaderAsync().ConfigureAwait(false)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:372— `await using … = new NpgsqlCommand( "SELECT set_config('application_name', $1, false...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:381— `await using … = new NpgsqlCommand($"LISTEN {JobsChannel}", _listenConn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:480— `await using … = new NpgsqlCommand( "SELECT set_config('application_name', $1, false...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) dotnet/src/BullMQ/Postgres/PostgresConnection.cs:489— `await using … = new NpgsqlCommand($"LISTEN {EventsChannel}", _eventsConn)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
ClassTooLong: RedisQueueBackend src/classes/redis-queue-backend.ts:124— ClassTooLong — 1796 significant lines (blank, comment-only and punctuation-only lines excluded), 121 methods. The bar is 400 significant lines; this is 1396 over it, 4.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Queue rust/src/queue.rs:71— ClassTooLong — 1790 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 98 methods, 2 blocks, lines 71-2900. The bar is 400 significant lines; this is 1390 over it, 4.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PostgresQueueBackend src/postgres/postgres-queue-backend.ts:251— ClassTooLong — 1280 significant lines (blank, comment-only and punctuation-only lines excluded), 93 methods. The bar is 400 significant lines; this is 880 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Worker rust/src/worker.rs:174— ClassTooLong — 1252 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 3 blocks, lines 174-2466. The bar is 400 significant lines; this is 852 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Job rust/src/job.rs:44— ClassTooLong — 965 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 63 methods, 2 blocks, lines 44-1523. The bar is 400 significant lines; this is 565 over it, 2.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Worker src/classes/worker.ts:200— ClassTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 433 over it, 2.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.
ClassTooLong: Job src/classes/job.ts:64— ClassTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 249 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FlowProducer rust/src/flow_producer.rs:224— ClassTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 28 methods, 2 blocks, lines 224-1216. The bar is 400 significant lines; this is 211 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.
ClassTooLong: BunRedisAdapter src/classes/bun-redis-client.ts:123— ClassTooLong — 607 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 207 over it, 1.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ValkeyGlideAdapter src/classes/valkey-glide-client.ts:322— ClassTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 164 over it, 1.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RedisConnection src/classes/redis-connection.ts:153— ClassTooLong — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 45 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NodeRedisAdapter src/classes/node-redis-client.ts:192— ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 15 over it, 1.04× 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.
P12 · CI test-gate honesty· Runner config excludes tests no gate runs · ×10
Runner config excludes tests no gate runs vitest.config.ts:14— `tests/cluster.test.ts` removes 23 test(s) in 1 file(s) (e.g. `tests/cluster.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 vitest.config.ts:15— `tests/connection.test.ts` removes 53 test(s) in 1 file(s) (e.g. `tests/connection.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 vitest.config.ts:16— `tests/sandboxed_process.test.ts` removes 52 test(s) in 1 file(s) (e.g. `tests/sandboxed_process.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 vitest.config.ts:17— `tests/worker.ioredis.test.ts` removes 2 test(s) in 1 file(s) (e.g. `tests/worker.ioredis.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 vitest.config.ts:18— `tests/relay.ioredis.test.ts` removes 24 test(s) in 1 file(s) (e.g. `tests/relay.ioredis.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 vitest.config.ts:21— `tests/node-redis.test.ts` removes 22 test(s) in 1 file(s) (e.g. `tests/node-redis.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 vitest.config.ts:22— `tests/adapter-conformance.test.ts` removes 68 test(s) in 1 file(s) (e.g. `tests/adapter-conformance.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 vitest.config.ts:23— `tests/bun-redis.test.ts` removes 13 test(s) in 1 file(s) (e.g. `tests/bun-redis.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 vitest.config.ts:24— `tests/bun-adapter-suite.test.ts` removes 6 test(s) in 1 file(s) (e.g. `tests/bun-adapter-suite.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 vitest.config.ts:27— `tests/postgres/**` removes 76 test(s) in 7 file(s) (e.g. `tests/postgres/migration.test.ts`, `tests/postgres/operations.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.
Queue::get_jobs (cognitive 31) rust/src/queue.rs:990— Queue::get_jobs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 4 (7 pts), match/switch 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.
Queue::upsert_job_scheduler (cognitive 24) rust/src/queue.rs:2511— Queue::upsert_job_scheduler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Queue::get_ranges (cognitive 23) rust/src/queue.rs:900— Queue::get_ranges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 pts), match/switch 2 (4 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.
Queue::get_dependencies (cognitive 20) rust/src/queue.rs:1562— Queue::get_dependencies has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1, match/switch 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.
Queue::pack_add_args (cognitive 17) rust/src/queue.rs:445— Queue::pack_add_args 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.
Queue::pack_job_opts (cognitive 16) rust/src/queue.rs:523— Queue::pack_job_opts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 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.
Queue::clean (cognitive 16) rust/src/queue.rs:1923— Queue::clean has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 4). 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.
Duplicated block (9 lines × 2) elixir/lib/bullmq/job.ex:641— elixir/lib/bullmq/job.ex:641-649 | elixir/lib/bullmq/job.ex:700-708 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) python/bullmq/scripts.py:131— python/bullmq/scripts.py:131-139 | python/bullmq/scripts.py:153-161 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) rust/src/job.rs:1261— rust/src/job.rs:1261-1269 | rust/src/worker.rs:2015-2023 — 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 `rust/src/job.rs:1261` 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) rust/src/queue.rs:1169— rust/src/queue.rs:1169-1177 | rust/src/queue.rs:1271-1279 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) rust/src/worker.rs:1947— rust/src/worker.rs:1947-1955 | rust/src/worker.rs:2017-2025 — 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 `rust/src/worker.rs:1947` 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) rust/src/job.rs:1027— rust/src/job.rs:1027-1035 | rust/src/job.rs:1131-1139 — 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 `rust/src/job.rs:1027` 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) rust/src/job.rs:652— rust/src/job.rs:652-660 | rust/src/job.rs:692-700 — 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 `rust/src/job.rs:652` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2 locations) src/classes/bun-redis-client.ts:763— src/classes/bun-redis-client.ts:763 · src/classes/bun-redis-client.ts:1266 — 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 (12 lines × 2 locations) src/classes/bun-redis-client.ts:845— src/classes/bun-redis-client.ts:845 · src/classes/bun-redis-client.ts:870 — 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 (12 lines × 2 locations) src/classes/ioredis-client.ts:376— src/classes/ioredis-client.ts:376 · src/classes/ioredis-client.ts:391 — 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 (12 lines × 2 locations) src/classes/queue.ts:633— src/classes/queue.ts:633 · src/classes/queue.ts:654 — 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 (12 lines × 2 locations) src/classes/queue.ts:888— src/classes/queue.ts:888 · src/classes/queue.ts:918 — 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 (12 lines × 2 locations) src/classes/redis-queue-backend.ts:734— src/classes/redis-queue-backend.ts:734 · src/postgres/postgres-queue-backend.ts:670 — 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 (12 lines × 2 locations) src/classes/redis-queue-backend.ts:2253— src/classes/redis-queue-backend.ts:2253 · src/postgres/postgres-queue-backend.ts:1901 — 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.
MethodTooLong: JobScheduler.upsertJobScheduler src/classes/job-scheduler.ts:127— MethodTooLong — upsertJobScheduler 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.
MethodTooLong: Worker.process_fetched_job rust/src/worker.rs:1066— MethodTooLong — process_fetched_job runs 114 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 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ChildProcessor.wrapJob src/classes/child-processor.ts:156— MethodTooLong — wrapJob runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Queue.upsert_job_scheduler rust/src/queue.rs:2511— MethodTooLong — upsert_job_scheduler runs 110 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 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ScriptRegistry.embedded_scripts rust/src/scripts.rs:138— MethodTooLong — embedded_scripts 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.
MethodTooLong: ScriptLoader.resolveDependencies REDACTED:175— MethodTooLong — resolveDependencies runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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.
Duplicated block (13 lines × 2 locations) src/classes/bun-redis-client.ts:1456— src/classes/bun-redis-client.ts:1456 · src/classes/node-redis-client.ts:1074 — 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.
Duplicated block (13 lines × 2 locations) src/classes/child-processor.ts:299— src/classes/child-processor.ts:299 · src/classes/child-processor.ts:323 — 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 (13 lines × 2 locations) src/classes/flow-producer.ts:418— src/classes/flow-producer.ts:418 · src/classes/job-scheduler.ts:213 — 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.
Duplicated block (13 lines × 2 locations) src/classes/valkey-glide-client.ts:181— src/classes/valkey-glide-client.ts:181 · src/classes/valkey-glide-client.ts:238 — 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 (13 lines × 2 locations) src/classes/valkey-glide-client.ts:793— src/classes/valkey-glide-client.ts:793 · src/classes/valkey-glide-client.ts:807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2 locations) src/postgres/postgres-queue-backend.ts:1825— src/postgres/postgres-queue-backend.ts:1825 · src/postgres/postgres-queue-backend.ts:1839 — 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.
Unused dependency '@semantic-release/changelog' package.json:116— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@semantic-release/changelog' dotnet/package.json:12— Declared in dotnet/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 '@semantic-release/changelog' elixir/package.json:18— Declared in elixir/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 '@semantic-release/changelog' php/package.json:15— Declared in php/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 '@semantic-release/changelog' python/package.json:18— Declared in python/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 '@semantic-release/changelog' rust/package.json:11— Declared in rust/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 '@semantic-release/commit-analyzer' package.json:117— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@semantic-release/commit-analyzer' dotnet/package.json:13— Declared in dotnet/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 '@semantic-release/commit-analyzer' elixir/package.json:19— Declared in elixir/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 '@semantic-release/commit-analyzer' php/package.json:16— Declared in php/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 '@semantic-release/commit-analyzer' python/package.json:19— Declared in python/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 '@semantic-release/commit-analyzer' rust/package.json:12— Declared in rust/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 '@semantic-release/github' package.json:120— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@semantic-release/github' dotnet/package.json:16— Declared in dotnet/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 '@semantic-release/github' elixir/package.json:22— Declared in elixir/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 '@semantic-release/github' php/package.json:19— Declared in php/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 '@semantic-release/github' python/package.json:22— Declared in python/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 '@semantic-release/github' rust/package.json:15— Declared in rust/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 '@semantic-release/release-notes-generator' package.json:122— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@semantic-release/release-notes-generator' dotnet/package.json:17— Declared in dotnet/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 '@semantic-release/release-notes-generator' elixir/package.json:23— Declared in elixir/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 '@semantic-release/release-notes-generator' php/package.json:20— Declared in php/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 '@semantic-release/release-notes-generator' python/package.json:23— Declared in python/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 '@semantic-release/release-notes-generator' rust/package.json:16— Declared in rust/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.
Worker::parse_move_to_active_result (cognitive 34) rust/src/worker.rs:2197— Worker::parse_move_to_active_result has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 20). 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.
Worker::update_job_scheduler (cognitive 28) rust/src/worker.rs:1328— Worker::update_job_scheduler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::pack_update_scheduler_opts (cognitive 27) rust/src/worker.rs:1460— Worker::pack_update_scheduler_opts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::run_main_driver (cognitive 19) rust/src/worker.rs:890— Worker::run_main_driver has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::process_fetched_job (cognitive 17) rust/src/worker.rs:1066— Worker::process_fetched_job has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (14 lines × 2) elixir/lib/bullmq/backends/postgres.ex:460— elixir/lib/bullmq/backends/postgres.ex:460-473 | elixir/lib/bullmq/backends/postgres.ex:512-525 — 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 `elixir/lib/bullmq/backends/postgres.ex:460` 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 before the matched lines, `elixir/lib/bullmq/backends/postgres.ex:511` calls `get` and `elixir/lib/bullmq/backends/postgres.ex:459` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) elixir/lib/bullmq/worker.ex:1718— elixir/lib/bullmq/worker.ex:1718-1731 | elixir/lib/bullmq/worker.ex:1809-1822 — 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 (14 lines × 2) elixir/lib/bullmq/worker.ex:1855— elixir/lib/bullmq/worker.ex:1855-1868 | elixir/lib/bullmq/worker.ex:2478-2491 — 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 `elixir/lib/bullmq/worker.ex:1855` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) rust/src/flow_producer.rs:865— rust/src/flow_producer.rs:865-878 | rust/src/queue.rs:305-318 — before extracting anything, compare `rust/src/flow_producer.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/src/queue.rs:301` calls `timestamp`, `opts`, `as_deref` and `rust/src/flow_producer.rs:863` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) rust/src/worker.rs:812— rust/src/worker.rs:812-825 | rust/src/worker.rs:833-846 — 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 `rust/src/worker.rs:812` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) elixir/lib/bullmq/backends/redis.ex:202— elixir/lib/bullmq/backends/redis.ex:202-209 | elixir/lib/bullmq/backends/redis.ex:224-231 — 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) elixir/lib/bullmq/queue.ex:1678— elixir/lib/bullmq/queue.ex:1678-1685 | elixir/lib/bullmq/queue.ex:1696-1703 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `elixir/lib/bullmq/queue.ex:1695` calls `merge` and `elixir/lib/bullmq/queue.ex:1677` 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) rust/src/job.rs:378— rust/src/job.rs:378-385 | rust/src/job.rs:420-427 — 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) rust/src/queue.rs:756— rust/src/queue.rs:756-763 | rust/src/queue.rs:785-792 — 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 `rust/src/queue.rs:756` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) rust/src/job_scheduler.rs:233— rust/src/job_scheduler.rs:233-240 | rust/src/job_scheduler.rs:266-273 — 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 (5 lines × 2) dotnet/src/BullMQ/PostgresBackend.cs:150— dotnet/src/BullMQ/PostgresBackend.cs:150-154 | dotnet/src/BullMQ/PostgresBackend.cs:170-174 — 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 `dotnet/src/BullMQ/PostgresBackend.cs:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) dotnet/src/BullMQ/Postgres/SqlLoader.cs:76— dotnet/src/BullMQ/Postgres/SqlLoader.cs:76-80 | dotnet/src/BullMQ/Redis/LuaScripts.cs:85-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) python/bullmq/scripts.py:291— python/bullmq/scripts.py:291-295 | python/bullmq/scripts.py:326-330 — 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 (5 lines × 2) rust/src/queue.rs:643— rust/src/queue.rs:643-647 | rust/src/queue.rs:650-654 — 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 `rust/src/queue.rs:643` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) rust/src/queue.rs:1908— rust/src/queue.rs:1908-1912 | rust/src/queue.rs:2019-2023 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) elixir/lib/bullmq/queue.ex:385— elixir/lib/bullmq/queue.ex:385-391 | elixir/lib/bullmq/queue.ex:406-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) elixir/lib/bullmq/queue_events.ex:196— elixir/lib/bullmq/queue_events.ex:196-202 | elixir/lib/bullmq/worker.ex:330-336 — 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 (7 lines × 2) rust/src/job.rs:1226— rust/src/job.rs:1226-1232 | rust/src/job.rs:1323-1330 — 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 `rust/src/job.rs:1226` 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) rust/src/queue.rs:912— rust/src/queue.rs:912-919 | rust/src/queue.rs:1002-1008 — 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 `rust/src/queue.rs:912` 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, `rust/src/queue.rs:1009` calls `to_string` and `rust/src/queue.rs:924` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) rust/src/queue.rs:2449— rust/src/queue.rs:2449-2455 | rust/src/worker.rs:1796-1802 — before extracting anything, compare `rust/src/queue.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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 `rust/src/queue.rs:2449` 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.
Repeated repair: python/bullmq/scripts.py python/bullmq/scripts.py:847— python/bullmq/scripts.py 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 11 (its worst body is Scripts.finishedErrors at line 847), 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(flow): defer parent release until all children are added (python) (elixir) (rust) (dotnet) (#4988) fixes #4944”; “fix(job): make changePriority work and read priority from the job hash [python] (#5022)”; “fix(job): respect priority when retrying a finished job (python) (elixir) (rust) (dotnet) (#4926)”; “fix(job): use Optional for parameters defaulting to None [python] (#4908) fixes #4905”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- python/bullmq/scripts.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: rust/src/scripts.rs rust/src/scripts.rs:39— rust/src/scripts.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is LuaScript::execute at line 39), 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(flow): defer parent release until all children are added (python) (elixir) (rust) (dotnet) (#4988) fixes #4944”; “fix(job): respect priority when retrying a finished job (python) (elixir) (rust) (dotnet) (#4926)”; “fix(connection): use connection manager to recover from disconnections [rust] (#4806) fixes #4742”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- rust/src/scripts.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: src/postgres/postgres-connection.ts src/postgres/postgres-connection.ts:191— src/postgres/postgres-connection.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is PostgresConnection.constructor at line 191), 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(connection): infer backend-specific connection options instead of hiding mismatches with casts (#4796)”; “fix(postgres): retry the LISTEN connection after a failed connect (#4781)”; “fix(worker): delegate maximumBlockTimeout to the backend (python) (#4644)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- src/postgres/postgres-connection.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: python/bullmq/job.py python/bullmq/job.py:35— python/bullmq/job.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is Job.__init__ at line 35), 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(job): make changePriority work and read priority from the job hash [python] (#5022)”; “fix(job): keep the latest stack traces when stackTraceLimit is set [python] (#4955)”; “fix(job): use Optional for parameters defaulting to None [python] (#4908) fixes #4905”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- python/bullmq/job.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.
Duplicated block (6 lines × 2) python/benchmark_backends.py:81— python/benchmark_backends.py:81-86 | python/benchmark_backends.py:94-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) rust/src/queue.rs:2645— rust/src/queue.rs:2645-2652 | rust/src/queue.rs:2685-2690 — 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 `rust/src/queue.rs:2645` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) rust/src/redis_connection.rs:358— rust/src/redis_connection.rs:358-363 | rust/src/redis_connection.rs:369-374 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) rust/src/queue.rs:1674— rust/src/queue.rs:1674-1679 | rust/src/queue.rs:1696-1701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2 locations) src/classes/bun-redis-client.ts:1362— src/classes/bun-redis-client.ts:1362 · src/classes/node-redis-client.ts:1043 — 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 (11 lines × 2 locations) src/classes/redis-queue-backend.ts:1348— src/classes/redis-queue-backend.ts:1348 · src/classes/redis-queue-backend.ts:1390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2 locations) src/classes/redis-queue-backend.ts:2491— src/classes/redis-queue-backend.ts:2491 · src/classes/redis-queue-backend.ts:2514 — 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 (11 lines × 2 locations) src/classes/valkey-glide-client.ts:1164— src/classes/valkey-glide-client.ts:1164 · src/classes/valkey-glide-client.ts:1199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R4 · Test Coverage· No test reaches this file · ×4
No test reaches this file elixir/scripts/updateVersion.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file php/scripts/updateVersion.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file vitest.postgres.global-setup.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/classes/main-worker.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.
Queue::upsert_job_scheduler (cyclomatic 21) rust/src/queue.rs:2511— Queue::upsert_job_scheduler has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Queue::get_jobs (cyclomatic 19) rust/src/queue.rs:990— Queue::get_jobs 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.
Queue::clean (cyclomatic 17) rust/src/queue.rs:1923— Queue::clean 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.
FlowProducer::pack_add_args (cognitive 23) rust/src/flow_producer.rs:940— FlowProducer::pack_add_args has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (23 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
FlowProducer::pack_job_opts (cognitive 16) rust/src/flow_producer.rs:1038— FlowProducer::pack_job_opts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 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.
FlowProducer::apply_pipeline_results (cognitive 16) rust/src/flow_producer.rs:1134— FlowProducer::apply_pipeline_results has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: ioredis-client.createIORedisClient src/classes/ioredis-client.ts:51— FunctionTooLong — createIORedisClient runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sandbox.sandbox src/classes/sandbox.ts:7— FunctionTooLong — sandbox runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sandbox.sandbox.process src/classes/sandbox.ts:11— FunctionTooLong — sandbox.process runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) rust/src/job.rs:347— rust/src/job.rs:347-362 | rust/src/job.rs:468-483 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) rust/src/queue.rs:120— rust/src/queue.rs:120-136 | rust/src/queue.rs:143-158 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) dotnet/src/BullMQ/Worker.cs:76— dotnet/src/BullMQ/Worker.cs:76-100 | dotnet/src/BullMQ/QueueEvents.cs:105-120 — 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 (7 corresponding lines) · ×3
Edited copy of a member (7 corresponding lines) dotnet/src/BullMQ/RedisBackend.cs:864— dotnet/src/BullMQ/RedisBackend.cs:864-870 | dotnet/src/BullMQ/RedisBackend.cs:873-879 — 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) rust/src/redis_connection.rs:357— rust/src/redis_connection.rs:357-363 | rust/src/redis_connection.rs:368-374 — 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) elixir/lib/bullmq/job_scheduler.ex:414— elixir/lib/bullmq/job_scheduler.ex:414-421 | elixir/lib/bullmq/stalled_checker.ex:127-133 — 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 (16 lines × 2) rust/src/flow_producer.rs:1000— rust/src/flow_producer.rs:1000-1015 | rust/src/queue.rs:489-504 — before extracting anything, compare `rust/src/flow_producer.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 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 `rust/src/flow_producer.rs:1000` 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, `rust/src/queue.rs:505` calls `write_nil`, `unwrap` and `rust/src/flow_producer.rs:1016` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) rust/src/worker.rs:1967— rust/src/worker.rs:1967-1982 | rust/src/worker.rs:2037-2052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/src/worker.rs:2053` calls `to_string` and `rust/src/worker.rs:1983` 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 (16 lines × 2) rust/src/job.rs:390— rust/src/job.rs:390-405 | rust/src/queue.rs:1716-1731 — before extracting anything, compare `rust/src/job.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `rust/src/job.rs:390` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) rust/src/worker.rs:1914— rust/src/worker.rs:1914-1921 | rust/src/worker.rs:1992-1999 | rust/src/worker.rs:2071-2078 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/worker.rs:1914` 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) rust/src/job_scheduler.rs:156— rust/src/job_scheduler.rs:156-163 | rust/src/job_scheduler.rs:299-307 | rust/src/worker.rs:1498-1505 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 `rust/src/job_scheduler.rs:156` 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) rust/src/job_scheduler.rs:174— rust/src/job_scheduler.rs:174-181 | rust/src/job_scheduler.rs:292-300 | rust/src/worker.rs:1492-1499 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 `rust/src/job_scheduler.rs:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) rust/src/job_scheduler.rs:333— rust/src/job_scheduler.rs:333-340 | rust/src/queue.rs:2862-2867 | rust/src/worker.rs:1542-1549 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `rust/src/job_scheduler.rs:333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) rust/src/queue.rs:2236— rust/src/queue.rs:2236-2241 | rust/src/queue.rs:2307-2312 | rust/src/queue.rs:2683-2689 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/queue.rs:2236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) rust/src/job.rs:323— rust/src/job.rs:323-328 | rust/src/job.rs:349-354 | rust/src/job.rs:470-475 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/job.rs:323` 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 locations) src/classes/child-processor.ts:243— src/classes/child-processor.ts:243 · src/classes/child-processor.ts:269 — 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 (15 lines × 2 locations) src/classes/ioredis-client.ts:155— src/classes/ioredis-client.ts:155 · src/classes/ioredis-client.ts:172 — 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 (15 lines × 2 locations) src/classes/redis-queue-backend.ts:921— src/classes/redis-queue-backend.ts:921 · src/classes/redis-queue-backend.ts:974 — 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 (10 lines × 2 locations) src/classes/bun-redis-client.ts:862— src/classes/bun-redis-client.ts:862 · src/classes/bun-redis-client.ts:885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2 locations) src/classes/bun-redis-client.ts:1375— src/classes/bun-redis-client.ts:1375 · src/classes/node-redis-client.ts:1056 — 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.
Duplicated block (10 lines × 2 locations) src/classes/node-redis-client.ts:602— src/classes/node-redis-client.ts:602 · src/classes/node-redis-client.ts:625 — 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.
bullmq_official::flow_producer::merge_job_options (cyclomatic 21) rust/src/flow_producer.rs:1296— bullmq_official::flow_producer::merge_job_options has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bullmq_official::job_scheduler::pack_delayed_job_opts (cyclomatic 16) rust/src/job_scheduler.rs:213— bullmq_official::job_scheduler::pack_delayed_job_opts 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.
Hotspot: src/classes/worker.ts src/classes/worker.ts:672— src/classes/worker.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Worker.mainLoop at line 672. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- src/classes/worker.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: src/classes/bun-redis-client.ts src/classes/bun-redis-client.ts:339— src/classes/bun-redis-client.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in BunRedisAdapter.connect at line 339. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 23:08:37 -07:00' --until='2026-11-16 23:08:37 -07:00' --full-history --no-merges -- src/classes/bun-redis-client.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
bullmq_official::flow_producer::merge_job_options (cognitive 20) rust/src/flow_producer.rs:1296— bullmq_official::flow_producer::merge_job_options has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
bullmq_official::job_scheduler::pack_delayed_job_opts (cognitive 16) rust/src/job_scheduler.rs:213— bullmq_official::job_scheduler::pack_delayed_job_opts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2 (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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×2
Near-duplicate member pair (36 shared lines) rust/src/worker.rs:1943— rust/src/worker.rs:1943-2002 | rust/src/worker.rs:2013-2081 — These two members are variants of one another: 36 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.
Near-duplicate member pair (36 shared lines) rust/src/queue.rs:906— rust/src/queue.rs:906-985 | rust/src/queue.rs:996-1105 — These two members are variants of one another: 36 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 (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) rust/src/worker.rs:807— rust/src/worker.rs:807-825 | rust/src/worker.rs:828-846 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) elixir/lib/bullmq/scripts.ex:2037— elixir/lib/bullmq/scripts.ex:2037-2055 | elixir/lib/bullmq/scripts.ex:2059-2077 — 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 (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) python/bullmq/scripts.py:586— python/bullmq/scripts.py:586-599 | python/bullmq/scripts.py:711-723 — 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) elixir/lib/bullmq/scripts.ex:1481— elixir/lib/bullmq/scripts.ex:1481-1493 | elixir/lib/bullmq/scripts.ex:1638-1657 — 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 (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) elixir/lib/bullmq/backends/postgres.ex:1071— elixir/lib/bullmq/backends/postgres.ex:1071-1090 | elixir/lib/bullmq/backends/postgres.ex:1102-1116 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) dotnet/src/BullMQ/Job.cs:259— dotnet/src/BullMQ/Job.cs:259-273 | dotnet/src/BullMQ/Job.cs:282-298 — 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 (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) rust/src/flow_producer.rs:1113— rust/src/flow_producer.rs:1113-1120 | rust/src/paginate.rs:45-52 — 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) elixir/lib/bullmq/backends/postgres.ex:959— elixir/lib/bullmq/backends/postgres.ex:959-966 | elixir/lib/bullmq/backends/redis.ex:748-755 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) elixir/lib/bullmq/job.ex:575— elixir/lib/bullmq/job.ex:575-586 | elixir/lib/bullmq/scripts.ex:2208-2217 — 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) rust/src/flow_producer.rs:1201— rust/src/flow_producer.rs:1201-1210 | rust/src/queue.rs:357-366 — 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 (13 lines × 2) dotnet/src/BullMQ/OptsCodec.cs:122— dotnet/src/BullMQ/OptsCodec.cs:122-134 | dotnet/src/BullMQ/RedisBackend.cs:1275-1287 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) rust/src/job.rs:330— rust/src/job.rs:330-342 | rust/src/queue.rs:1677-1689 — before extracting anything, compare `rust/src/job.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `rust/src/job.rs:330` 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 (10 lines × 3) elixir/lib/bullmq/worker.ex:1515— elixir/lib/bullmq/worker.ex:1515-1524 | elixir/lib/bullmq/worker.ex:1775-1784 | elixir/lib/bullmq/worker.ex:2276-2285 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `elixir/lib/bullmq/worker.ex:1515` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) rust/src/job.rs:590— rust/src/job.rs:590-599 | rust/src/job.rs:1042-1051 | rust/src/job.rs:1089-1098 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/job.rs:590` 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 (15 lines × 2) elixir/lib/bullmq/backends/redis.ex:269— elixir/lib/bullmq/backends/redis.ex:269-283 | elixir/lib/bullmq/queue.ex:1918-1932 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) rust/src/flow_producer.rs:316— rust/src/flow_producer.rs:316-330 | rust/src/flow_producer.rs:405-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/src/flow_producer.rs:393` calls `with_capacity` and `rust/src/flow_producer.rs:313` 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 (17–19 lines × 2) rust/src/job_scheduler.rs:296— rust/src/job_scheduler.rs:296-314 | rust/src/worker.rs:1495-1511 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 (17–19 lines × 2) rust/src/worker.rs:383— rust/src/worker.rs:383-399 | rust/src/worker.rs:487-505 — 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 `rust/src/worker.rs:383` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) rust/src/job.rs:896— rust/src/job.rs:896-906 | rust/src/queue.rs:1814-1824 — before extracting anything, compare `rust/src/job.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `rust/src/job.rs:896` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) rust/src/job.rs:1041— rust/src/job.rs:1041-1051 | rust/src/job.rs:1088-1098 — 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 `rust/src/job.rs:1041` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) rust/src/job.rs:1046— rust/src/job.rs:1046-1051 | rust/src/job.rs:1093-1098 | rust/src/job.rs:1227-1232 | rust/src/job.rs:1325-1330 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/job.rs:1046` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) rust/src/job.rs:322— rust/src/job.rs:322-327 | rust/src/job.rs:348-353 | rust/src/job.rs:469-474 | rust/src/job.rs:746-751 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) rust/src/job.rs:597— rust/src/job.rs:597-601 | rust/src/queue.rs:1773-1777 | rust/src/queue.rs:1868-1875 — before extracting anything, compare `rust/src/job.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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 `rust/src/job.rs:597` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) rust/src/job_scheduler.rs:165— rust/src/job_scheduler.rs:165-169 | rust/src/job_scheduler.rs:289-293 | rust/src/worker.rs:1475-1479 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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.
Sync-over-async blocking scripts/generateRawScripts.ts:17— `fs.existsSync` in `transpileScripts` 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 scripts/generateRawScripts.ts:18— `fs.mkdirSync` in `transpileScripts` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Duplicated block (21 lines × 2 locations) src/classes/bun-redis-client.ts:597— src/classes/bun-redis-client.ts:597 · src/classes/node-redis-client.ts:427 — 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.
Duplicated block (21 lines × 2 locations) src/classes/bun-redis-client.ts:1290— src/classes/bun-redis-client.ts:1290 · src/classes/bun-redis-client.ts:1319 — 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 (18 lines × 2 locations) src/classes/node-redis-client.ts:965— src/classes/node-redis-client.ts:965 · src/classes/node-redis-client.ts:996 — 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 (18 lines × 2 locations) src/classes/queue.ts:263— src/classes/queue.ts:263 · src/classes/worker.ts:602 — 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.
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×2
NuGet dependencies are not locked dotnet/src/BullMQ/BullMQ.csproj:43— dotnet/src/BullMQ/BullMQ.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked dotnet/tests/BullMQ.Tests/BullMQ.Tests.csproj:16— dotnet/tests/BullMQ.Tests/BullMQ.Tests.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
ioredis-client.createIORedisClient (cyclomatic 42) src/classes/ioredis-client.ts:51— ioredis-client.createIORedisClient has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 15 of the 42 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 220, 136, 193, …). 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.
JobScheduler.upsertJobScheduler (cyclomatic 36) src/classes/job-scheduler.ts:127— JobScheduler.upsertJobScheduler has cyclomatic complexity 36 (threshold 15). Of this number, 23 points are the body's own statements and 13 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.
JobScheduler.upsertJobScheduler (cyclomatic 32) python/bullmq/job_scheduler.py:131— JobScheduler.upsertJobScheduler has cyclomatic complexity 32 (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.
Job.ParseOpts (cyclomatic 26) dotnet/src/BullMQ/Job.cs:316— Job.ParseOpts has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sandbox.sandbox.process (cyclomatic 24) src/classes/sandbox.ts:11— sandbox.sandbox.process has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 35, 22, 137). 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.
Worker.constructor (cyclomatic 24) src/classes/worker.ts:286— Worker.constructor 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.
Job.ParseRepeat (cyclomatic 23) dotnet/src/BullMQ/Job.cs:391— Job.ParseRepeat has cyclomatic complexity 23 (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.
JobScheduler.UpsertJobSchedulerAsync (cyclomatic 21) dotnet/src/BullMQ/JobScheduler.cs:30— JobScheduler.UpsertJobSchedulerAsync has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RedisQueueBackend.getDependencies (cyclomatic 21) src/classes/redis-queue-backend.ts:2597— RedisQueueBackend.getDependencies has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
BunRedisAdapter.connect (cyclomatic 20) src/classes/bun-redis-client.ts:339— BunRedisAdapter.connect has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
job_scheduler._transform_scheduler_data (cyclomatic 19) python/bullmq/job_scheduler.py:348— job_scheduler._transform_scheduler_data 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.
Worker.run (cyclomatic 19) python/bullmq/worker.py:162— Worker.run 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.
ScriptLoader.resolveDependencies (cyclomatic 19) REDACTED:175— ScriptLoader.resolveDependencies has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
Job.validateOptions (cyclomatic 19) src/classes/job.ts:1333— Job.validateOptions 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.
ValkeyGlideAdapter.execQueuedCommands (cyclomatic 19) src/classes/valkey-glide-client.ts:1122— ValkeyGlideAdapter.execQueuedCommands has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1139, 1164, 1199, …). 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.
Worker.mainLoop (cyclomatic 19) src/classes/worker.ts:672— Worker.mainLoop 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.
Worker.handle_job_completion (cyclomatic 18) elixir/lib/bullmq/worker.ex:2101— Worker.handle_job_completion has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Worker::pack_update_scheduler_opts (cyclomatic 18) rust/src/worker.rs:1460— Worker::pack_update_scheduler_opts 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.
RedisConnection.getRedisVersionAndType (cyclomatic 18) src/classes/redis-connection.ts:820— RedisConnection.getRedisVersionAndType 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.
JobScheduler.transform_scheduler_data (cyclomatic 17) elixir/lib/bullmq/job_scheduler.ex:732— JobScheduler.transform_scheduler_data 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.
Scripts.build_parent_obj (cyclomatic 17) elixir/lib/bullmq/scripts.ex:2087— Scripts.build_parent_obj has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Job.fromRaw (cyclomatic 17) php/src/Job.php:176— Job.fromRaw 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.
JobOptions.fromArray (cyclomatic 17) php/src/JobOptions.php:113— JobOptions.fromArray 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.
PostgresQueueBackend.getDependencies (cyclomatic 17) src/postgres/postgres-queue-backend.ts:1711— PostgresQueueBackend.getDependencies has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
Scripts.get_deduplication_opts (cyclomatic 16) elixir/lib/bullmq/scripts.ex:2240— Scripts.get_deduplication_opts has cyclomatic complexity 16 (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.
JobScheduler.upsertJobScheduler (cognitive 54) src/classes/job-scheduler.ts:127— JobScheduler.upsertJobScheduler has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (25 pts), ternaries 7 (17 pts), boolean chains 12 (nesting depth added 19). Of this number, 22 points are the body's own statements and 32 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.
job_scheduler._transform_scheduler_data (cognitive 45) python/bullmq/job_scheduler.py:348— job_scheduler._transform_scheduler_data has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (31 pts), error handling 2 (8 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Worker.constructor (cognitive 40) src/classes/worker.ts:286— Worker.constructor has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, ternaries 2 (7 pts), error handling 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValkeyGlideAdapter.execQueuedCommands (cognitive 39) src/classes/valkey-glide-client.ts:1122— ValkeyGlideAdapter.execQueuedCommands has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 4 (7 pts), error handling 3 (6 pts), loops 2 (4 pts) (nesting depth added 20). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1139, 1164, 1199, …). 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.
ScriptLoader.resolveDependencies (cognitive 38) REDACTED:175— ScriptLoader.resolveDependencies has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), error handling 1 (4 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 16). Of this number, 34 points are the body's own statements and 4 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.
JobScheduler.upsertJobScheduler (cognitive 36) python/bullmq/job_scheduler.py:131— JobScheduler.upsertJobScheduler has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 13, error handling 1 (2 pts), ternaries 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.
Worker.retryIfFailed (cognitive 36) src/classes/worker.ts:1579— Worker.retryIfFailed has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (30 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (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.
RedisQueueBackend.getDependencies (cognitive 35) src/classes/redis-queue-backend.ts:2597— RedisQueueBackend.getDependencies has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 4 (8 pts), loops 2 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). Of this number, 19 points are the body's own statements and 16 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.
Worker.retryIfFailed (cognitive 33) python/bullmq/worker.py:502— Worker.retryIfFailed has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 3, error handling 1 (2 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.
RedisConnection.getRedisVersionAndType (cognitive 33) src/classes/redis-connection.ts:820— RedisConnection.getRedisVersionAndType has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 3, loops 2 (3 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.
Job.ParseOpts (cognitive 32) dotnet/src/BullMQ/Job.cs:316— Job.ParseOpts has cognitive complexity 32 (threshold 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.
JobScheduler.transform_scheduler_data (cognitive 30) elixir/lib/bullmq/job_scheduler.ex:732— JobScheduler.transform_scheduler_data has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, match/switch 12 (14 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RedisQueueBackend.removeOrphanedJobs (cognitive 29) src/classes/redis-queue-backend.ts:2384— RedisQueueBackend.removeOrphanedJobs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scripts.get_deduplication_opts (cognitive 28) elixir/lib/bullmq/scripts.ex:2240— Scripts.get_deduplication_opts has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 8 (9 pts), boolean chains 6 (nesting depth added 7). 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.
PostgresBackend.waitForJob (cognitive 28) python/bullmq/backends/postgres_backend.py:780— PostgresBackend.waitForJob has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), error handling 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.
Worker.run (cognitive 28) python/bullmq/worker.py:162— Worker.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 3 (5 pts), error handling 2 (4 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.
Worker.waitForJob (cognitive 27) src/classes/worker.ts:861— Worker.waitForJob has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
QueueEvents::consume (cognitive 25) rust/src/queue_events.rs:497— QueueEvents::consume has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 2 (8 pts), loops 3 (8 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.
Job.validateOptions (cognitive 25) src/classes/job.ts:1333— Job.validateOptions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4 (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.
Queue.get_jobs (cognitive 24) elixir/lib/bullmq/queue.ex:750— Queue.get_jobs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (11 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.
NodeRedisAdapter.runCommand (cognitive 24) src/classes/node-redis-client.ts:469— NodeRedisAdapter.runCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 11). Of this number, 21 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.
Worker.mainLoop (cognitive 24) src/classes/worker.ts:672— Worker.mainLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 3 (5 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.
Queue._parse_client_list (cognitive 23) python/bullmq/queue.py:223— Queue._parse_client_list has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 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.
Relay.readLoop (cognitive 23) src/classes/relay.ts:616— Relay.readLoop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker.MainLoopAsync (cognitive 22) dotnet/src/BullMQ/Worker.cs:159— Worker.MainLoopAsync has cognitive complexity 22 (threshold 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.
ScriptLoader.loadScripts (cognitive 22) REDACTED:463— ScriptLoader.loadScripts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 8). Of this number, 15 points are the body's own statements and 7 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.
JobScheduler.transformSchedulerData (cognitive 22) src/classes/job-scheduler.ts:379— JobScheduler.transformSchedulerData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 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.
Job.ParseRepeat (cognitive 21) dotnet/src/BullMQ/Job.cs:391— Job.ParseRepeat has cognitive complexity 21 (threshold 15). 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.
QueueEvents.consumeEvents (cognitive 21) src/classes/queue-events.ts:371— QueueEvents.consumeEvents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (4 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.
JobScheduler.UpsertJobSchedulerAsync (cognitive 20) dotnet/src/BullMQ/JobScheduler.cs:30— JobScheduler.UpsertJobSchedulerAsync has cognitive complexity 20 (threshold 15). 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.
PostgresBackend.WaitForJobAsync (cognitive 20) dotnet/src/BullMQ/PostgresBackend.cs:775— PostgresBackend.WaitForJobAsync has cognitive complexity 20 (threshold 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.
Worker.pause (cognitive 20) python/bullmq/worker.py:678— Worker.pause has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OptsCodec.ToStorageMap (cognitive 19) dotnet/src/BullMQ/OptsCodec.cs:43— OptsCodec.ToStorageMap has cognitive complexity 19 (threshold 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.
Worker.handle_call (cognitive 19) elixir/lib/bullmq/worker.ex:761— Worker.handle_call has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 4, boolean chains 1 (nesting depth added 10). 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.
Job.fromRaw (cognitive 19) php/src/Job.php:176— Job.fromRaw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Worker.nextJobFromJobData (cognitive 19) src/classes/worker.ts:965— Worker.nextJobFromJobData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 7). Of this number, 12 points are the body's own statements and 7 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.
BunRedisAdapter.connect (cognitive 18) src/classes/bun-redis-client.ts:339— BunRedisAdapter.connect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7 (nesting depth added 3). Of this number, 15 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.
RedisConnection.init (cognitive 18) src/classes/redis-connection.ts:401— RedisConnection.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
redis-queue-backend.optsAsJSON (cognitive 18) src/classes/redis-queue-backend.ts:3120— redis-queue-backend.optsAsJSON has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenTelemetry.trace (cognitive 17) elixir/lib/bullmq/telemetry/opentelemetry.ex:412— OpenTelemetry.trace has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 5 (7 pts), boolean chains 1, match/switch 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.
LockManager._renewal_loop (cognitive 17) python/bullmq/lock_manager.py:168— LockManager._renewal_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), error handling 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.
Worker._processJobAndFetchNext (cognitive 17) python/bullmq/worker.py:435— Worker._processJobAndFetchNext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Queue.getJobsByType (cognitive 17) php/src/Queue.php:319— Queue.getJobsByType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BunRedisAdapter.disconnect (cognitive 17) src/classes/bun-redis-client.ts:456— BunRedisAdapter.disconnect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 9). Of this number, 9 points are the body's own statements and 8 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.
Scripts.build_parent_obj (cognitive 16) elixir/lib/bullmq/scripts.ex:2087— Scripts.build_parent_obj has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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.
Worker.handle_job_completion (cognitive 16) elixir/lib/bullmq/worker.ex:2101— Worker.handle_job_completion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 3 (nesting depth added 3). 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.
Job.__init__ (cognitive 16) python/bullmq/job.py:35— Job.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JobOptions.fromArray (cognitive 16) php/src/JobOptions.php:113— JobOptions.fromArray has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
PostgresQueueBackend.getDependencies (cognitive 16) src/postgres/postgres-queue-backend.ts:1711— PostgresQueueBackend.getDependencies has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 5, match/switch 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
postgres-queue-backend.mapSchedulerRow (cognitive 16) src/postgres/postgres-queue-backend.ts:187— postgres-queue-backend.mapSchedulerRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RedisQueueBackend.paginate (cognitive 16) src/classes/redis-queue-backend.ts:2261— RedisQueueBackend.paginate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFunctions: Keys elixir/lib/bullmq/keys.ex:1— TooManyFunctions — 43 functions. The bar is 30 functions; this is 13 over it, 1.43× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
Change coupling: child-processor.ts ↔ sandbox.ts src/classes/child-processor.ts:1— `src/classes/child-processor.ts` and `src/classes/sandbox.ts` change together 57% of the time (13 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `7dd064ec` fix(sandbox): kill children that fail init and surface refusal errors…; `ec420d1b` feat(sandbox): add getDependencies proxy for sandboxed processors (#3…; `cbfe437a` feat(sandbox): add getDependenciesCount proxy for jobs (#3923) ref #3… — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) elixir/lib/bullmq/scripts.ex:326— elixir/lib/bullmq/scripts.ex:326-382 | elixir/lib/bullmq/scripts.ex:464-529 | elixir/lib/bullmq/scripts.ex:539-580 | elixir/lib/bullmq/scripts.ex:634-693 | elixir/lib/bullmq/scripts.ex:702-767 | elixir/lib/bullmq/scripts.ex:777-821 | elixir/lib/bullmq/scripts.ex:851-910 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 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 7 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) rust/src/flow_producer.rs:1038— rust/src/flow_producer.rs:1038-1110 | rust/src/job_scheduler.rs:147-210 | rust/src/job_scheduler.rs:220-375 | rust/src/queue.rs:523-596 | rust/src/queue.rs:2857-2894 | rust/src/worker.rs:1460-1584 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 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 6 times.
D4 · Code Duplication· Edited copy of a member (76 corresponding lines) · ×1
Edited copy of a member (76 corresponding lines) rust/src/flow_producer.rs:947— rust/src/flow_producer.rs:947-1035 | rust/src/queue.rs:445-520 — These two members are one piece of code written twice and then edited apart: 76 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 (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) rust/src/flow_producer.rs:295— rust/src/flow_producer.rs:295-356 | rust/src/flow_producer.rs:367-454 — These two members are one piece of code written twice and then edited apart: 62 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) rust/src/job.rs:868— rust/src/job.rs:868-906 | rust/src/queue.rs:1791-1824 — These two members are one piece of code written twice and then edited apart: 34 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 (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) rust/src/job.rs:492— rust/src/job.rs:492-540 | rust/src/queue.rs:1756-1788 — These two members are one piece of code written twice and then edited apart: 33 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 (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) rust/src/queue.rs:2039— rust/src/queue.rs:2039-2081 | rust/src/queue.rs:2086-2122 — These two members are one piece of code written twice and then edited apart: 37 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 (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) elixir/lib/bullmq/backends/postgres.ex:458— elixir/lib/bullmq/backends/postgres.ex:458-504 | elixir/lib/bullmq/backends/postgres.ex:509-558 — These two members are one piece of code written twice and then edited apart: 47 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) python/bullmq/backends/postgres_backend.py:421— python/bullmq/backends/postgres_backend.py:421-448 | python/bullmq/backends/postgres_backend.py:454-483 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 34+ corresponding lines) · ×1
Edited copies of one member (4 members, 34+ corresponding lines) rust/src/job.rs:976— rust/src/job.rs:976-1012 | rust/src/job.rs:1017-1055 | rust/src/job.rs:1061-1102 | rust/src/worker.rs:1769-1802 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) elixir/lib/bullmq/worker.ex:1501— elixir/lib/bullmq/worker.ex:1501-1532 | elixir/lib/bullmq/worker.ex:1873-1907 — 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 copies of one member (3 members, 32+ corresponding lines) · ×1
Edited copies of one member (3 members, 32+ corresponding lines) rust/src/job.rs:630— rust/src/job.rs:630-670 | rust/src/job.rs:673-705 | rust/src/job.rs:708-739 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) rust/src/job.rs:377— rust/src/job.rs:377-405 | rust/src/queue.rs:1708-1731 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) rust/src/queue.rs:2224— rust/src/queue.rs:2224-2245 | rust/src/queue.rs:2432-2455 | rust/src/queue.rs:2780-2801 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) dotnet/src/BullMQ/PostgresBackend.cs:139— dotnet/src/BullMQ/PostgresBackend.cs:139-159 | dotnet/src/BullMQ/PostgresBackend.cs:162-179 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) elixir/lib/bullmq/job.ex:630— elixir/lib/bullmq/job.ex:630-649 | elixir/lib/bullmq/job.ex:684-708 — 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 (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) elixir/lib/bullmq/backends/redis.ex:992— elixir/lib/bullmq/backends/redis.ex:992-1002 | elixir/lib/bullmq/backends/redis.ex:1006-1016 — 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) · ×1
Edited copy of a member (17 corresponding lines) elixir/lib/bullmq/worker.ex:1852— elixir/lib/bullmq/worker.ex:1852-1868 | elixir/lib/bullmq/worker.ex:2475-2491 — 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, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) rust/src/queue.rs:745— rust/src/queue.rs:745-770 | rust/src/queue.rs:774-799 | rust/src/queue.rs:1897-1914 | rust/src/queue.rs:2002-2027 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 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 (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) elixir/lib/bullmq/redis_connection.ex:504— elixir/lib/bullmq/redis_connection.ex:504-523 | elixir/lib/bullmq/redis_connection.ex:648-659 — 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 (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) dotnet/src/BullMQ/RedisBackend.cs:582— dotnet/src/BullMQ/RedisBackend.cs:582-601 | dotnet/src/BullMQ/RedisBackend.cs:636-649 — 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 copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) rust/src/queue.rs:1695— rust/src/queue.rs:1695-1705 | rust/src/queue.rs:1734-1744 | rust/src/queue.rs:2358-2366 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 12+ corresponding lines) · ×1
Edited copies of one member (6 members, 12+ corresponding lines) rust/src/queue.rs:729— rust/src/queue.rs:729-741 | rust/src/queue.rs:2128-2141 | rust/src/queue.rs:2158-2170 | rust/src/queue.rs:2173-2184 | rust/src/queue.rs:2187-2201 | rust/src/queue.rs:2204-2216 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) dotnet/src/BullMQ/Postgres/SqlLoader.cs:75— dotnet/src/BullMQ/Postgres/SqlLoader.cs:75-80 | dotnet/src/BullMQ/Redis/LuaScripts.cs:84-89 — 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 (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) dotnet/src/BullMQ/Queue.cs:28— dotnet/src/BullMQ/Queue.cs:28-38 | dotnet/src/BullMQ/QueueEvents.cs:123-131 — 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.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×1
Edited copies of one member (4 members, 3+ corresponding lines) elixir/lib/bullmq/backends/redis.ex:1020— elixir/lib/bullmq/backends/redis.ex:1020-1022 | elixir/lib/bullmq/job_scheduler.ex:834-839 | elixir/lib/bullmq/queue.ex:1972-1974 | elixir/lib/bullmq/queue_events.ex:434-436 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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 (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) elixir/lib/bullmq/backends/redis.ex:82— elixir/lib/bullmq/backends/redis.ex:82-85 | elixir/lib/bullmq/redis_connection.ex:593-596 — 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 (30–45 lines × 6) elixir/lib/bullmq/scripts.ex:483— elixir/lib/bullmq/scripts.ex:483-527 | elixir/lib/bullmq/scripts.ex:549-578 | elixir/lib/bullmq/scripts.ex:647-691 | elixir/lib/bullmq/scripts.ex:721-765 | elixir/lib/bullmq/scripts.ex:790-819 | elixir/lib/bullmq/scripts.ex:864-908 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `elixir/lib/bullmq/scripts.ex:483` 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 before the matched lines, `elixir/lib/bullmq/scripts.ex:785` calls `waiting_children` and `elixir/lib/bullmq/scripts.ex:642` 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 (20–21 lines × 2) elixir/lib/bullmq/backends/postgres.ex:474— elixir/lib/bullmq/backends/postgres.ex:474-494 | elixir/lib/bullmq/backends/postgres.ex:528-547 — 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 `elixir/lib/bullmq/backends/postgres.ex:474` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–21 lines × 2) elixir/lib/bullmq/backends/redis.ex:532— elixir/lib/bullmq/backends/redis.ex:532-542 | elixir/lib/bullmq/scripts.ex:1701-1721 — 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 `elixir/lib/bullmq/backends/redis.ex:532` 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 (21 lines × 2) elixir/lib/bullmq/scripts.ex:923— elixir/lib/bullmq/scripts.ex:923-943 | elixir/lib/bullmq/scripts.ex:1005-1025 — 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 `elixir/lib/bullmq/scripts.ex:923` 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, `elixir/lib/bullmq/scripts.ex:1027` calls `get`, `job` and `elixir/lib/bullmq/scripts.ex:945` 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 (11–20 lines × 3) elixir/lib/bullmq/scripts.ex:332— elixir/lib/bullmq/scripts.ex:332-342 | elixir/lib/bullmq/scripts.ex:464-483 | elixir/lib/bullmq/scripts.ex:539-549 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 2) elixir/lib/bullmq/scripts.ex:395— elixir/lib/bullmq/scripts.ex:395-406 | elixir/lib/bullmq/scripts.ex:421-432 — 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 (20 lines × 2) python/bullmq/backends/postgres_backend.py:423— python/bullmq/backends/postgres_backend.py:423-442 | python/bullmq/backends/postgres_backend.py:458-477 — 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 (32–33 lines × 2) rust/src/flow_producer.rs:1039— rust/src/flow_producer.rs:1039-1070 | rust/src/queue.rs:524-556 — before extracting anything, compare `rust/src/flow_producer.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 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 `rust/src/flow_producer.rs:1039` 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 (29 lines × 2) rust/src/job_scheduler.rs:333— rust/src/job_scheduler.rs:333-361 | rust/src/worker.rs:1542-1570 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 `rust/src/job_scheduler.rs:333` 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 (24–25 lines × 2) rust/src/worker.rs:1152— rust/src/worker.rs:1152-1175 | rust/src/worker.rs:1199-1223 — 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 `rust/src/worker.rs:1152` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18 lines × 2) rust/src/flow_producer.rs:1087— rust/src/flow_producer.rs:1087-1104 | rust/src/queue.rs:573-590 — before extracting anything, compare `rust/src/flow_producer.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 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 `rust/src/flow_producer.rs:1087` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–17 lines × 2) rust/src/queue.rs:937— rust/src/queue.rs:937-953 | rust/src/queue.rs:1027-1040 — 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 `rust/src/queue.rs:937` 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, `rust/src/queue.rs:1041` calls `Int`, `Some`, `to_string` and `rust/src/queue.rs:954` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–16 lines × 3) rust/src/job_scheduler.rs:354— rust/src/job_scheduler.rs:354-369 | rust/src/queue.rs:2877-2889 | rust/src/worker.rs:1563-1578 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `rust/src/job_scheduler.rs:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–15 lines × 2) rust/src/queue.rs:924— rust/src/queue.rs:924-934 | rust/src/queue.rs:1010-1024 — 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 `rust/src/queue.rs:1010` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/src/queue.rs:1009` calls `to_string` and `rust/src/queue.rs:919` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–15 lines × 2) rust/src/worker.rs:366— rust/src/worker.rs:366-379 | rust/src/worker.rs:437-451 — 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 (12–14 lines × 2) rust/src/flow_producer.rs:337— rust/src/flow_producer.rs:337-348 | rust/src/flow_producer.rs:432-445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rust/src/flow_producer.rs:427` calls `push` and `rust/src/flow_producer.rs:335` 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 (11–12 lines × 3) rust/src/job_scheduler.rs:189— rust/src/job_scheduler.rs:189-199 | rust/src/job_scheduler.rs:310-321 | rust/src/worker.rs:1507-1517 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `rust/src/job_scheduler.rs:202` calls `with_capacity` and `rust/src/job_scheduler.rs:323` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) rust/src/job_scheduler.rs:282— rust/src/job_scheduler.rs:282-293 | rust/src/worker.rs:1469-1479 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 (11 lines × 3) rust/src/worker.rs:300— rust/src/worker.rs:300-310 | rust/src/worker.rs:313-323 | rust/src/worker.rs:2135-2145 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/worker.rs:300` 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 (8–9 lines × 6) rust/src/flow_producer.rs:1102— rust/src/flow_producer.rs:1102-1110 | rust/src/job_scheduler.rs:202-210 | rust/src/job_scheduler.rs:367-375 | rust/src/queue.rs:588-596 | rust/src/queue.rs:2887-2894 | rust/src/worker.rs:1576-1584 — before extracting anything, compare `rust/src/flow_producer.rs` and `rust/src/queue.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 90 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 `rust/src/flow_producer.rs:1102` 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 (4–9 lines × 4) rust/src/queue.rs:1519— rust/src/queue.rs:1519-1522 | rust/src/queue.rs:1772-1777 | rust/src/queue.rs:1867-1875 | rust/src/queue.rs:2793-2798 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/queue.rs:1772` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) rust/src/queue.rs:556— rust/src/queue.rs:556-564 | rust/src/queue.rs:2871-2878 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 2) rust/src/job_scheduler.rs:323— rust/src/job_scheduler.rs:323-330 | rust/src/worker.rs:1520-1526 — before extracting anything, compare `rust/src/job_scheduler.rs` and `rust/src/worker.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 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 `rust/src/job_scheduler.rs:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 6) rust/src/job.rs:1006— rust/src/job.rs:1006-1012 | rust/src/job.rs:1049-1055 | rust/src/job.rs:1096-1102 | rust/src/job.rs:1328-1334 | rust/src/worker.rs:1996-2002 | rust/src/worker.rs:2075-2081 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/job.rs:1006` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 6) rust/src/job.rs:1005— rust/src/job.rs:1005-1009 | rust/src/job.rs:1048-1052 | rust/src/job.rs:1095-1099 | rust/src/job.rs:1229-1233 | rust/src/job.rs:1327-1331 | rust/src/job.rs:1385-1389 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/src/job.rs:1005` 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 before the matched lines, `rust/src/job.rs:1382` calls `unwrap_or`, `as_bytes` and `rust/src/job.rs:1227` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
P8 · Schema migrations· Schema created by a CREATE TABLE statement outside the migrations · ×1
Schema created by a CREATE TABLE statement outside the migrations dotnet/src/BullMQ/Postgres/PostgresConnection.cs:186— This repository evolves its schema with versioned migrations, but a CREATE TABLE statement here creates schema at runtime outside them — structure no migration created and the migration history does not describe, so a later migration that touches it fails on a fresh environment and the environments drift apart. Create it in a migration instead.
Duplication concentrated across 4 sibling directories (11 clone groups) src/classes/redis-relay-backend.ts:140— 11 duplicated blocks under src/ have copies in at least two of the sibling directories classes, interfaces, postgres, utils — 5 of them are reported below, and 6 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 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 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 11 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (54 lines × 2 locations) src/postgres/postgres-queue-backend.ts:812— src/postgres/postgres-queue-backend.ts:812 · src/postgres/postgres-queue-backend.ts:880 — 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 (40 lines × 2 locations) src/classes/bun-redis-client.ts:938— src/classes/bun-redis-client.ts:938 · src/classes/valkey-glide-client.ts:861 — 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 (35 matched lines × 2 locations) · ×1
Duplicated block with local edits (35 matched lines × 2 locations) src/classes/redis-relay-backend.ts:140— src/classes/redis-relay-backend.ts:140 · src/postgres/postgres-relay-backend.ts:98 — the two spans are one implementation copied and then locally edited — 152 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 (25 lines × 2 locations) src/classes/queue-events-producer.ts:19— src/classes/queue-events-producer.ts:19 · src/classes/queue.ts:163 — 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 (24 lines × 2 locations) src/classes/job.ts:422— src/classes/job.ts:422 · src/classes/redis-queue-backend.ts:3032 — 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.
Duplicated block (19 lines × 2 locations) src/classes/bun-redis-client.ts:495— src/classes/bun-redis-client.ts:495 · src/classes/valkey-glide-client.ts:619 — 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.
Duplicated block (19 lines × 3 locations) src/classes/redis-queue-backend.ts:496— src/classes/redis-queue-backend.ts:496 · src/classes/redis-queue-backend.ts:529 · src/classes/redis-queue-backend.ts:598 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (17 matched lines × 2 locations) · ×1
Duplicated block with local edits (17 matched lines × 2 locations) src/classes/redis-queue-backend.ts:298— src/classes/redis-queue-backend.ts:298 · src/postgres/postgres-queue-backend.ts:360 — the two spans are one implementation copied and then locally edited — 91 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 (16 lines × 2 locations) src/classes/redis-queue-backend.ts:1307— src/classes/redis-queue-backend.ts:1307 · src/classes/redis-queue-backend.ts:1782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2 locations) src/classes/job-scheduler.ts:526— src/classes/job-scheduler.ts:526 · src/classes/job-scheduler.ts: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.
Duplicated block (10 lines × 3 locations) src/classes/node-redis-client.ts:502— src/classes/node-redis-client.ts:502 · src/classes/node-redis-client.ts:726 · src/classes/node-redis-client.ts:773 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (10 matched lines × 2 locations) · ×1
Duplicated block with local edits (10 matched lines × 2 locations) src/classes/redis-queue-backend.ts:2065— src/classes/redis-queue-backend.ts:2065 · src/classes/redis-relay-backend.ts:418 — the two spans are one implementation copied and then locally edited — 69 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.
Boundary violation [package:test-suite-dependency] vitest.postgres.global-setup.ts:15— vitest.postgres.global-setup.ts:15 imports tests/postgres/utils/postgres-url.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.
Complex function executeImmediately (cyclomatic 102, cognitive 128) tests/valkey-glide-client.test.ts:90— executeImmediately has cyclomatic complexity 102 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 constructor (cyclomatic 24, cognitive 24) src/classes/relay.ts:157— constructor has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function addJob (cyclomatic 24, cognitive 20) src/postgres/postgres-queue-backend.ts:565— addJob 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 toBatchEntry (cyclomatic 20, cognitive 15) src/postgres/postgres-queue-backend.ts:646— toBatchEntry has cyclomatic complexity 20 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getRedisVersionAndType (cyclomatic 18, cognitive 33) src/classes/redis-connection.ts:820— getRedisVersionAndType has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rowToJobJson (cyclomatic 18, cognitive 17) src/postgres/postgres-queue-backend.ts:124— rowToJobJson has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 connect (cyclomatic 17, cognitive 18) src/classes/bun-redis-client.ts:339— connect has cyclomatic complexity 17 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 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 resolveDependencies (cyclomatic 16, cognitive 34) REDACTED:175— resolveDependencies has cyclomatic complexity 16 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getDependencies (cyclomatic 16, cognitive 15) src/postgres/postgres-queue-backend.ts:1711— getDependencies has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function mapSchedulerRow (cyclomatic 15, cognitive 16) src/postgres/postgres-queue-backend.ts:187— mapSchedulerRow has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 removeOrphanedJobs (cyclomatic 14, cognitive 30) src/classes/redis-queue-backend.ts:2384— removeOrphanedJobs has cyclomatic complexity 14 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 (anonymous) (cyclomatic 14, cognitive 28) src/classes/valkey-glide-client.ts:1139— (anonymous) has cyclomatic complexity 14 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 14, cognitive 22) src/classes/job-scheduler.ts:210— (anonymous) has cyclomatic complexity 14 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 loadScripts (cyclomatic 14, cognitive 16) REDACTED:463— loadScripts has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 isIRedisClient (cyclomatic 14, cognitive 13) src/classes/ioredis-client.ts:415— isIRedisClient has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getDependencies (cyclomatic 13, cognitive 19) src/classes/redis-queue-backend.ts:2597— getDependencies has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 readInbox (cyclomatic 13, cognitive 15) src/classes/redis-relay-backend.ts:243— readInbox has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readLoop (cyclomatic 12, cognitive 23) src/classes/relay.ts:616— readLoop has cyclomatic complexity 12 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 paginate (cyclomatic 12, cognitive 17) src/classes/redis-queue-backend.ts:2261— paginate has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function moveToCompleted (cyclomatic 12, cognitive 12) src/postgres/postgres-queue-backend.ts:807— moveToCompleted has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function moveToFailed (cyclomatic 12, cognitive 12) src/postgres/postgres-queue-backend.ts:874— moveToFailed has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function moveToDelayed (cyclomatic 12, cognitive 12) src/postgres/postgres-queue-backend.ts:942— moveToDelayed has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function isJobInState (cyclomatic 12, cognitive 9) src/classes/redis-queue-backend.ts:450— isJobInState has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runCommand (cyclomatic 11, cognitive 21) src/classes/node-redis-client.ts:469— runCommand has cyclomatic complexity 11 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 15) tests/relay.ioredis.test.ts:616— (anonymous) has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function referenceParse (cyclomatic 11, cognitive 15) tests/relay.test.ts:23— referenceParse has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 12) src/classes/flow-producer.ts:410— (anonymous) has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function addJobToTransaction (cyclomatic 11, cognitive 11) src/classes/redis-queue-backend.ts:639— addJobToTransaction has cyclomatic complexity 11 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 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 11, cognitive 10) tests/postgres/operations.test.ts:57— (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/classes/redis-queue-backend.ts · ×1
src/classes/redis-queue-backend.ts: 2766 lines of code src/classes/redis-queue-backend.ts:1— src/classes/redis-queue-backend.ts has 2766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/postgres/postgres-queue-backend.ts · ×1
src/postgres/postgres-queue-backend.ts: 2131 lines of code src/postgres/postgres-queue-backend.ts:1— src/postgres/postgres-queue-backend.ts has 2131 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/classes/worker.ts: 1487 lines of code src/classes/worker.ts:1— src/classes/worker.ts has 1487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/bun-redis-client.ts · ×1
src/classes/bun-redis-client.ts: 1329 lines of code src/classes/bun-redis-client.ts:1— src/classes/bun-redis-client.ts has 1329 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/classes/job.ts: 1265 lines of code src/classes/job.ts:1— src/classes/job.ts has 1265 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/valkey-glide-client.ts · ×1
src/classes/valkey-glide-client.ts: 1144 lines of code src/classes/valkey-glide-client.ts:1— src/classes/valkey-glide-client.ts has 1144 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/node-redis-client.ts · ×1
src/classes/node-redis-client.ts: 975 lines of code src/classes/node-redis-client.ts:1— src/classes/node-redis-client.ts has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/classes/queue.ts: 900 lines of code src/classes/queue.ts:1— src/classes/queue.ts has 900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/redis-connection.ts · ×1
src/classes/redis-connection.ts: 798 lines of code src/classes/redis-connection.ts:1— src/classes/redis-connection.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/interfaces/queue-backend.ts · ×1
src/interfaces/queue-backend.ts: 708 lines of code src/interfaces/queue-backend.ts:1— src/interfaces/queue-backend.ts has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/classes/relay.ts: 701 lines of code src/classes/relay.ts:1— src/classes/relay.ts has 701 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/queue-getters.ts · ×1
src/classes/queue-getters.ts: 664 lines of code src/classes/queue-getters.ts:1— src/classes/queue-getters.ts has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/flow-producer.ts · ×1
src/classes/flow-producer.ts: 643 lines of code src/classes/flow-producer.ts:1— src/classes/flow-producer.ts has 643 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: 573 lines of code REDACTED:1— REDACTED has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/redis-relay-backend.ts · ×1
src/classes/redis-relay-backend.ts: 570 lines of code src/classes/redis-relay-backend.ts:1— src/classes/redis-relay-backend.ts has 570 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/job-scheduler.ts · ×1
src/classes/job-scheduler.ts: 504 lines of code src/classes/job-scheduler.ts:1— src/classes/job-scheduler.ts has 504 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/postgres/postgres-connection.ts · ×1
src/postgres/postgres-connection.ts: 473 lines of code src/postgres/postgres-connection.ts:1— src/postgres/postgres-connection.ts has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/utils/index.ts: 445 lines of code src/utils/index.ts:1— src/utils/index.ts has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/postgres/postgres-relay-backend.ts · ×1
src/postgres/postgres-relay-backend.ts: 432 lines of code src/postgres/postgres-relay-backend.ts:1— src/postgres/postgres-relay-backend.ts has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/classes/ioredis-client.ts · ×1
src/classes/ioredis-client.ts: 410 lines of code src/classes/ioredis-client.ts:1— src/classes/ioredis-client.ts has 410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Benchmark script nothing runs (~486 LoC) benchmark/relay-benchmark.ts— This script imports the product ('../src/classes/relay'), so it is an authored benchmark, not measurement input — but nothing invokes it: no package.json script, no CI workflow or build recipe, no Dockerfile, no other file under benchmark/, and no in-repo reference to its name at all. It runs only if someone remembers to type `node benchmark/relay-benchmark.ts`, and it silently rots against the API it measures. Wire it into a script or workflow the way its wired siblings are, or delete it.
Unused dependency 'coveralls-next' package.json:133— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'cpx2' package.json:134— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'tslib' package.json:90— Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@commitlint/cli' elixir/package.json:16— Declared in elixir/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 'semantic-release-pypi' python/package.json:25— Declared in python/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.
redundant comment tests/clean.redis.test.ts:116— "Add jobs in wait state" repeats the code it sits on: 4 of its 4 words (add, jobs, wait, state) are already in `const waitJob = await queue.add('wait-job', { state: 'wait' });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/clean.redis.test.ts:119— "Add a delayed job" repeats the code it sits on: 3 of its 3 words (add, delayed, job) are already in `const delayedJob = await queue.add(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/clean.redis.test.ts:126— "Add a prioritized job" repeats the code it sits on: 3 of its 3 words (add, prioritized, job) are already in `const prioritizedJob = await queue.add(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/clean.redis.test.ts:197— "Add a real job with a custom ID" repeats the code it sits on: 5 of its 5 words (add, real, job, custom, id) are already in `const realJob = await queue.add(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/cluster.test.ts:233— "Stub the queue's client to return our mock cluster" repeats the code it sits on: 6 of its 6 words (stub, queue, client, return, mock, cluster) are already in `sandbox`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/deduplication.test.ts:1456— "Wait for first job to start processing" repeats the code it sits on: 4 of its 5 words (wait, first, start, processing) are already in `await firstProcessingStarted;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/deduplication.test.ts:2480— "Add first job with a custom jobId" repeats the code it sits on: 4 of its 5 words (add, job, custom, id) are already in `await queue.add(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/job_cancellation.test.ts:819— "Get active jobs from queue" repeats the code it sits on: 4 of its 4 words (get, active, jobs, queue) are already in `const activeJobs = await queue.getActive();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/job_scheduler.test.ts:2912— "Restore the delay stub" repeats the code it sits on: 3 of its 3 words (restore, delay, stub) are already in `delayStub.restore();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/job_scheduler.test.ts:3017— "Restore the delay stub" repeats the code it sits on: 3 of its 3 words (restore, delay, stub) are already in `delayStub.restore();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/job_scheduler.test.ts:3134— "Restore the delay stub" repeats the code it sits on: 3 of its 3 words (restore, delay, stub) are already in `delayStub.restore();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/lock_manager.test.ts:430— "Access the lock manager through the worker instance" repeats the code it sits on: 4 of its 5 words (lock, manager, worker, instance) are already in `lockManagerInstance = (worker as any).lockManager;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/sandboxed_process.test.ts:980— "Restore Job.getChildrenValues" repeats the code it sits on: 4 of its 5 words (job, get, children, values) are already in `Job.prototype.getChildrenValues = getChildrenValues;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/telemetry_interface.test.ts:1485— "Check that gauge recorded values for waiting state" repeats the code it sits on: 6 of its 6 words (check, gauge, recorded, values, waiting, state) are already in `const waitingRecord = gauge.values.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/worker.redis.test.ts:133— "Add spy to worker.moveToActive" repeats the code it sits on: 4 of its 5 words (spy, worker, move, active) are already in `const spy = sinon.spy(worker as any, 'moveToActive');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/worker.redis.test.ts:189— "Add spy to worker.moveToActive" repeats the code it sits on: 4 of its 5 words (spy, worker, move, active) are already in `const spy = sinon.spy(worker as any, 'moveToActive');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Duplicated predicate src/classes/redis-queue-backend.ts:2612— `!opts.processed && !opts.unprocessed && !opts.ignored && !opts.failed` appears character-identically in 2 files — src/classes/redis-queue-backend.ts, src/postgres/postgres-queue-backend.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 src/classes/redis-queue-backend.ts:455— `(await this.isJobInState('wait', jobId)) || (await this.isJobInState('paused', jobId))` appears character-identically in 2 files — src/classes/redis-queue-backend.ts, src/postgres/postgres-queue-backend.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 src/classes/bun-redis-client.ts:41— `args.length === 1 && Array.isArray(args[0])` appears character-identically in 3 files — src/classes/bun-redis-client.ts, src/classes/node-redis-client.ts, src/classes/valkey-glide-client.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 src/classes/redis-queue-backend.ts:2067— `client.isCluster && typeof client.nodes === 'function'` appears character-identically in 2 files — src/classes/redis-queue-backend.ts, src/classes/redis-relay-backend.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 src/classes/redis-connection.ts:753— `client.status === 'ready' || (client.status === 'connect' && isRedisCluster(client))` appears character-identically in 2 files — src/classes/redis-connection.ts, src/classes/redis-queue-backend.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 src/classes/bun-redis-client.ts:606— `opts && typeof opts === 'object' && opts.connectionName` appears character-identically in 2 files — src/classes/bun-redis-client.ts, src/classes/node-redis-client.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 src/classes/flow-producer.ts:421— `opts.telemetry?.metadata || (!omitContext && srcPropagationMetadata)` appears character-identically in 2 files — src/classes/flow-producer.ts, src/classes/job-scheduler.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:13— `opts?.host || process.env.REDIS_HOST || 'localhost'` appears character-identically in 4 files — REDACTED, vitest.node-redis.setup.ts, vitest.setup.ts, vitest.valkey-glide.setup.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:14— `opts?.port || Number(process.env.REDIS_PORT) || 6379` appears character-identically in 4 files — REDACTED, vitest.node-redis.setup.ts, vitest.setup.ts, vitest.valkey-glide.setup.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 src/utils/index.ts:202— `process.env.BULLMQ_TEST_PREFIX || 'bull'` appears character-identically in 2 files — src/utils/index.ts, vitest.setup.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 src/classes/redis-queue-backend.ts:957— `typeof result === 'number' && result < 0` appears character-identically in 2 files — src/classes/redis-queue-backend.ts, src/classes/relay-errors.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 dotnet/src/BullMQ/QueueEvents.cs:109— `opts.Postgres is null && opts.Connection is null` appears character-identically in 2 files — dotnet/src/BullMQ/QueueEvents.cs, dotnet/src/BullMQ/Worker.cs. 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 python/bullmq/queue_events.py:130— `version and isRedisVersionLowerThan( version, RedisConnection.minimum_version )` appears character-identically in 2 files — python/bullmq/queue_events.py, python/bullmq/queue_events_producer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate rust/src/flow_producer.rs:1194— `prefix.is_empty() || queue_name.is_empty() || job_id.is_empty()` appears character-identically in 2 files — rust/src/flow_producer.rs, rust/src/queue.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on error elixir/lib/bullmq/job.ex:559— `decode_opts` matches `{:error, _}` and answers `%{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/job.ex:1047— `decode_stacktrace` matches `_` and answers `[]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/job_scheduler.ex:362— `list` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/job_scheduler.ex:518— `calculate_next_millis` matches `{:error, _}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/queue.ex:781— `get_jobs` matches `_` and answers `[]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/telemetry/opentelemetry.ex:274— `deserialize_context` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/backends/postgres.ex:1202— `to_jsonb` matches `_` and answers `%{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/backends/redis.ex:858— `wait_for_job` matches `{:error, %Redix.ConnectionError{}}` and answers `:timeout` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error elixir/lib/bullmq/backends/postgres/sql_loader.ex:53— `priv_dir` matches `{:error, _}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Fat interface: IQueueBackend (67 members) dotnet/src/BullMQ/IQueueBackend.cs:15— `IQueueBackend` declares 67 members: `WaitUntilReadyAsync`, `CloseAsync`, `DisconnectAsync`, `Closing`, `SetNameAsync`, `ForQueue`, `MinimumBlockTimeout`, `Capabilities`, `QualifiedName`, `Keys`, `ToKey`, `ClientName`, `AddJobAsync`, `AddJobsAsync`, `AddFlowAsync`, `MoveToActiveAsync`, `MoveToCompletedAsync`, `MoveToFailedAsync`, `MoveToDelayedAsync`, `MoveToWaitingChildrenAsync`, `RetryJobAsync`, `ReprocessJobAsync`, `PromoteAsync`, `MoveStalledJobsToWaitAsync`, `RetryJobsAsync`, `PromoteJobsAsync`, `PauseAsync`, `DrainAsync`, `CleanJobsInSetAsync`, `ObliterateAsync`, `RemoveAsync`, `ExtendLockAsync`, `ExtendLocksAsync`, `UpdateDataAsync`, `UpdateProgressAsync`, `ChangePriorityAsync`, `AddLogAsync`, `GetStateAsync`, `IsJobInStateAsync`, `GetJobDataAsync`, and 27 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IRedisClient (44 required operations) src/interfaces/redis-client.ts:17— `IRedisClient` declares 44 required operations: `connect`, `disconnect`, `quit`, `duplicate`, `on`, `once`, `removeListener`, `off`, `emit`, `setMaxListeners`, `getMaxListeners`, `removeAllListeners`, `defineCommand`, `runCommand`, `multi`, `pipeline`, `hgetall`, `hget`, `hmget`, `hset`, `hdel`, `hexists`, `get`, `set`, `del`, `zrange`, `zrevrange`, `zcard`, `zscore`, `lrange`, `llen`, `ltrim`, `lpos`, `smembers`, `xadd`, `xread`, `xtrim`, `bzpopmin`, `info`, `clientSetName`, and 4 more. 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: IQueueBackend (85 required operations) src/interfaces/queue-backend.ts:61— `IQueueBackend` declares 85 required operations: `waitUntilReady`, `close`, `disconnect`, `setName`, `on`, `once`, `removeListener`, `forQueue`, `toKey`, `parseNodeKey`, `clientName`, `addJob`, `addJobs`, `addFlow`, `addJobScheduler`, `moveToActive`, `moveToCompleted`, `moveToFailed`, `moveToDelayed`, `moveToWaitingChildren`, `moveJobFromActiveToWait`, `retryJob`, `retryFinishedJob`, `promote`, `moveStalledJobsToWait`, `retryFinishedJobs`, `promoteJobs`, `pause`, `drain`, `cleanJobsByState`, `obliterate`, `removeOrphanedJobs`, `extendLock`, `extendLocks`, `updateData`, `updateProgress`, `addLog`, `clearLogs`, `changeDelay`, `changePriority`, and 45 more. 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: IRelayBackend (20 required operations) src/interfaces/relay-backend.ts:148— `IRelayBackend` declares 20 required operations: `waitUntilReady`, `close`, `registerNode`, `heartbeat`, `unregisterNode`, `sweep`, `subscribe`, `removeEndpoint`, `publish`, `deleteRetained`, `readInbox`, `trimInbox`, `getCounts`, `getNodes`, `getSubscriptions`, `getPatterns`, `getRetained`, `getNamespaces`, `getNodeConnections`, `interruptInbox`. 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: NodeRedisRawClient (48 required operations) src/classes/node-redis-client.ts:67— `NodeRedisRawClient` declares 48 required operations: `on`, `connect`, `destroy`, `quit`, `duplicate`, `scriptLoad`, `evalSha`, `eval`, `multi`, `hGetAll`, `hGet`, `hmGet`, `hSet`, `hDel`, `hExists`, `get`, `set`, `del`, `zRange`, `zCard`, `zScore`, `zAdd`, `zRem`, `lRange`, `lLen`, `lTrim`, `lPos`, `lPush`, `rPop`, `sMembers`, `sAdd`, `sCard`, `xAdd`, `xRead`, `xTrim`, `xLen`, `xRevRange`, `bzPopMin`, `info`, `clientSetName`, and 8 more. 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: QueueEventsListener (18 required operations) src/classes/queue-events.ts:16— `QueueEventsListener` declares 18 required operations: `active`, `added`, `cleaned`, `completed`, `deduplicated`, `delayed`, `drained`, `duplicated`, `error`, `failed`, `paused`, `progress`, `removed`, `resumed`, `retries-exhausted`, `stalled`, `waiting`, `waiting-children`. 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: Backend (58 abstract methods) python/bullmq/backend.py:33— `Backend` declares 58 abstract methods: `waitUntilReady`, `close`, `disconnect`, `setName`, `forQueue`, `minimumBlockTimeout`, `capabilities`, `qualifiedName`, `keys`, `toKey`, `clientName`, `addJob`, `addJobs`, `addFlow`, `moveToActive`, `moveToCompleted`, `moveToFailed`, `moveToDelayed`, `moveToWaitingChildren`, `retryJob`, `reprocessJob`, `promote`, `moveStalledJobsToWait`, `retryJobs`, `promoteJobs`, `pause`, `drain`, `cleanJobsInSet`, `obliterate`, `remove`, `extendLock`, `extendLocks`, `updateData`, `updateProgress`, `changePriority`, `addLog`, `getState`, `isJobInState`, `getJobData`, `getJobLogs`, and 18 more. Counted over its `@abstractmethod`s (and abstract properties), once per name; concrete methods are helpers an implementer inherits, not a burden, and `_`-prefixed members are not counted. 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.
P10 · Library API & versioning· Public type used only inside its own library · ×6
Public type used only inside its own library dotnet/src/BullMQ/JobScheduler.cs:14— `BullMQ.JobScheduler` (dotnet/src/BullMQ/JobScheduler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library dotnet/src/BullMQ/Options.cs:187— `BullMQ.KeepJobs` (dotnet/src/BullMQ/Options.cs:187) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library dotnet/src/BullMQ/Postgres/PostgresConnection.cs:45— `BullMQ.Postgres.PostgresConnection` (dotnet/src/BullMQ/Postgres/PostgresConnection.cs:45) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library dotnet/src/BullMQ/Postgres/SqlLoader.cs:15— `BullMQ.Postgres.SqlLoader` (dotnet/src/BullMQ/Postgres/SqlLoader.cs:15) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library dotnet/src/BullMQ/Redis/LuaScripts.cs:18— `BullMQ.Redis.LuaScripts` (dotnet/src/BullMQ/Redis/LuaScripts.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library dotnet/src/BullMQ/Version.cs:4— `BullMQ.Version` (dotnet/src/BullMQ/Version.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BullMQ.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Silent fallback default on parse failure dotnet/src/BullMQ/Postgres/SqlLoader.cs:51— `NameToVersion` falls back to `0` when `int.TryParse(prefix, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure dotnet/src/BullMQ/PostgresBackend.cs:1095— `ToInt` falls back to `0` when `long.TryParse(s, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure dotnet/src/BullMQ/RedisBackend.cs:1349— `ToLong` falls back to `0` when `long.TryParse((string?)result, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure python/bullmq/backends/postgres_backend.py:115— `_to_int` returns `0` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure python/bullmq/scripts.py:897— `convert_to_int` returns `0` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 rescue elixir/lib/bullmq/telemetry/opentelemetry.ex:128— `get_tracer` rescues `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue elixir/lib/bullmq/telemetry/opentelemetry.ex:162— `start_span` rescues `_` and answers `{:noop, nil}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue elixir/lib/bullmq/telemetry/opentelemetry.ex:215— `get_current_context` rescues `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue elixir/lib/bullmq/telemetry/opentelemetry.ex:243— `serialize_context` rescues `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in rescue elixir/lib/bullmq/telemetry/opentelemetry.ex:444— `trace` rescues `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default in catch python/bullmq/utils.py:71— `get_cluster_nodes` 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 elixir/lib/bullmq/backoff.ex:194— `get_custom_strategy` catches `:exit, _` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log what was caught or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: dotnet/src/BullMQ/Postgres/PostgresConnection.cs. Pair on, review, or document these before any departure.
D21 · Naming Consistency· `ProcessJob` returns an awaitable but lacks the `Async` suffix its 182 peers carry · ×1
`ProcessJob` returns an awaitable but lacks the `Async` suffix its 182 peers carry dotnet/src/BullMQ/Worker.cs:273— 182 of the 183 awaitable methods of project BullMQ are named with an affix the repository binds to awaitables (182 of 183; unit: awaitable methods of project BullMQ). Peers: BackendBuilder.CreateAsync (dotnet/src/BullMQ/BackendBuilder.cs:14); FlowProducer.AddAsync (dotnet/src/BullMQ/FlowProducer.cs:70); FlowProducer.CloseAsync (dotnet/src/BullMQ/FlowProducer.cs:150); IQueueBackend.WaitUntilReadyAsync (dotnet/src/BullMQ/IQueueBackend.cs:22); IQueueBackend.CloseAsync (dotnet/src/BullMQ/IQueueBackend.cs:25). Rename to `ProcessJobAsync`. [rule N4b]
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
README/code drift docs/gitbook/guide/relay/backends.md:13— docs/gitbook/guide/relay/backends.md names Redis 5, but the manifest declares `redis` 6.3.1. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
R7 · Dead Code· Unused module-local declaration 'ClusterNodeWithClientCommand' · ×1
Unused module-local declaration 'ClusterNodeWithClientCommand' src/classes/queue-getters.ts:13— 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 'FlowRootParentJobOpts' · ×1
Unused module-local declaration 'FlowRootParentJobOpts' src/interfaces/flow-job.ts:18— 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 'acceptsArbitraryConnection' · ×1
Unused module-local declaration 'acceptsArbitraryConnection' tests/types/backend-connections.ts:176— 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 'TypedQueue' · ×1
Unused module-local declaration 'TypedQueue' tests/types/constructor-options.ts:286— 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.
Silent fallback default on unknown code dotnet/src/BullMQ/JobState.cs:43— `FromWireString` maps every unrecognised code to `JobState.Unknown`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
Silent fallback default on Err rust/src/worker.rs:2274— `extract_element_as_u64` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
doc comments repeat the names dotnet/src/BullMQ/Options.cs:51— 0 of 0 documented parameters and 3 of 359 summaries in `BullMQ` only repeat the member or parameter name (e.g. "Options for a ." for `QueueOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names src/classes/flow-producer.ts:297— 9 of 288 documented parameters and 26 of 900 summaries in `bullmq` only repeat the member or parameter name (e.g. "Get a flow." for `getFlow`). 3 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `docs/.vitepress/theme/index.ts`, `php/src/Queue.php` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1ead7-c98a-7c34-89df-9c6a01d05d90 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 50 · Warnings: 487 · Recommendations: 76 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 18:49 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.