Public report of sinfin/folio, published 16 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 16 November 2026, 21:10 UTC · Survey ID cd_d4ef497899e24906ad7fdf0a897cc0c6

sinfin/folio

Measured 16 November 2026, 21:09 UTC, at code version ee9a07d

First survey, so nothing to compare with yet Supply-chain provenance & signing: not measured

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 38.5out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 46,329 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Code Health, 31.1

Findings by how serious they are

143 critical 723 serious 130 minor

8 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 21:09 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

78of 78 dimensions measured by tools.
930of 996 findings point to an exact file and line, so you can open each one in the code. The other 66 concern the repository as a whole, such as missing documentation.
78dimensions across 8 lenses, read from 46,329 lines of product code in 3 projects.
Chapters

Executive summary

sinfin/folio is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 38.5 out of 100, which the At risk rating leaves unchanged.

Code Health, at 31.1, is the weakest lens and counts most in the score. The best first steps are adding type checking and removing the unused code, each worth about 3.2 points. Raising Code Health to 70 would lift the score to about 44.3.

Eighty-three known security holes in the packages the code depends on can be used by attackers. Twelve weaknesses in the code could be used by an attacker, and eight controls can't be used without a mouse. Updating the vulnerable packages, fixing the weaknesses the scanner points to and making the controls work with a keyboard would close these risks. The two places where the code runs text as code or as a command need a direct call instead. The six form fields without a label need a label.

The product code is 46,329 lines, about €72,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 for The 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.
Code Health 31.1 · counts for 45%Accessibility 32.5 · counts for 25%Production Readiness 47.4 · counts for 14%Security and Compliance 51.3 · counts for 8%Domain Modelling 54.8 · counts for 4%Maturity 83.1 · counts for 2%Architecture 83.7 · counts for 1%Performance 100.0 · counts for 1%

If Code Health rose from 31.1 to 70, the lowest score rated Strong, the score would rise from 38.5 to about 44.3.

Code composition: what the lines of code are
Product code 54%Tests 46%
Rebuild cost: about €72,000 · Estimate
Cost to rebuild€24,000 to €120,000, for 401 to 1,273 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 39. 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.
SizeMedium: 46,329 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 3.2 points · Medium effort · Type Safety
2
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
Raises the score by about 3.2 points · Medium effort · Dead Code
3
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 3.1 points · Medium effort · Keyboard semantics

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 €72,000 to build again, about 0.5 person-years of work. Its weakest lens is Code Health, at 31.1 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 3.2 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 13,209 lines over the last 90 days, which is about 53,570 lines a year. At that pace, the extra work comes to an estimated 2.9 to 17.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

323 modules, with 168 dependencies between them. One loop runs through 9 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 283 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.
uses →1 Folio.Audited2 Folio.Cell3 Folio.Console.Component4 Folio.Sitemap5 Folio.Transportable6 tiptap.src.components.tiptap-command-groups7 tiptap.src.components.tiptap-editors.folio-editor.folio-editor-toolbar8 tiptap.src.components.tiptap-extensions.folio-tiptap-node9 tiptap.src.hooks10 Folio.Ai11 Folio.Captcha12 Folio.Console.Report13 Folio.Devise14 Folio.Publishable15 Folio.S316 Folio.Tiptap17 tiptap.src.components.tiptap-editors.folio-editor18 Folio.Console19 Folio20 Folio.Console.Links.Modal21 Folio.Console.Ui.Index22 Folio.Console.Ui.Index.Header23 Folio.Address24 Folio.Api25 Folio.Atom26 Folio.Console.Api27 Folio.Console.Atoms28 Folio.Console.Atoms.Previews29 Folio.Console.Catalogue30 Folio.Console.File31 Folio.Console.FilePlacements32 Folio.Console.Index33 Folio.Console.Layout34 Folio.Console.Ui35 Folio.CraMediaCloud36 Folio.File37 Folio.FilePlacement38 Folio.Users39 Folio.Console.Leads40 Folio.Devise.Omniauth
1 Folio.Audited
2 Folio.Cell
3 Folio.Console.Component
4 Folio.Sitemap
5 Folio.Transportable
6 tiptap.src.components.tiptap-command-groups
7 tiptap.src.components.tiptap-editors.folio-editor.folio-editor-toolbar
8 tiptap.src.components.tiptap-extensions.folio-tiptap-node
9 tiptap.src.hooks
10 Folio.Ai2
11 Folio.Captcha1
12 Folio.Console.Report6
13 Folio.Devise12
14 Folio.Publishable1
15 Folio.S31
16 Folio.Tiptap2
17 tiptap.src.components.tiptap-editors.folio-editor1
18 Folio.Console1120
19 Folio11112121115
20 Folio.Console.Links.Modal13
21 Folio.Console.Ui.Index22
22 Folio.Console.Ui.Index.Header11
23 Folio.Address12
24 Folio.Api113
25 Folio.Atom4
26 Folio.Console.Api21
27 Folio.Console.Atoms15
28 Folio.Console.Atoms.Previews13
29 Folio.Console.Catalogue12
30 Folio.Console.File82
31 Folio.Console.FilePlacements11
32 Folio.Console.Index17
33 Folio.Console.Layout11
34 Folio.Console.Ui243
35 Folio.CraMediaCloud25
36 Folio.File1313
37 Folio.FilePlacement2
38 Folio.Users411
39 Folio.Console.Leads11
40 Folio.Devise.Omniauth211
Uses a module listed above itPart of a loopThe module itself
1 Folio.Audited2 Folio.Cell3 Folio.Console.Component4 Folio.Sitemap5 Folio.Transportable6 tiptap.src.components.tiptap-command-groups7 tiptap.src.components.tiptap-editors.folio-editor.folio-editor-toolbar8 tiptap.src.components.tiptap-extensions.folio-tiptap-node9 tiptap.src.hooks10 Folio.Ai11 Folio.Captcha12 Folio.Console.Report13 Folio.Devise14 Folio.Publishable15 Folio.S316 Folio.Tiptap17 tiptap.src.components.tiptap-editors.folio-editor18 Folio.Console19 Folio20 Folio.Console.Links.Modal21 Folio.Console.Ui.Index22 Folio.Console.Ui.Index.Header23 Folio.Address24 Folio.Api25 Folio.Atom26 Folio.Console.Api27 Folio.Console.Atoms28 Folio.Console.Atoms.Previews29 Folio.Console.Catalogue30 Folio.Console.File31 Folio.Console.FilePlacements32 Folio.Console.Index33 Folio.Console.Layout34 Folio.Console.Ui35 Folio.CraMediaCloud36 Folio.File37 Folio.FilePlacement38 Folio.Users39 Folio.Console.Leads40 Folio.Devise.OmniauthFolio.Audited1Folio.Cell2Folio.Console.Component3Folio.Sitemap4Folio.Transportable5tiptap.src.components.tiptap-command-groups6tiptap.src.components.tiptap-editors.folio-editor.folio-editor-toolbar7tiptap.src.components.tiptap-extensions.folio-tiptap-node8tiptap.src.hooks9Folio.Ai10Folio.Captcha11Folio.Console.Report12Folio.Devise13Folio.Publishable14Folio.S315Folio.Tiptap16tiptap.src.components.tiptap-editors.folio-editor17Folio.Console18Folio19Folio.Console.Links.Modal20Folio.Console.Ui.Index21Folio.Console.Ui.Index.Header22Folio.Address23Folio.Api24Folio.Atom25Folio.Console.Api26Folio.Console.Atoms27Folio.Console.Atoms.Previews28Folio.Console.Catalogue29Folio.Console.File30Folio.Console.FilePlacements31Folio.Console.Index32Folio.Console.Layout33Folio.Console.Ui34Folio.CraMediaCloud35Folio.File36Folio.FilePlacement37Folio.Users38Folio.Console.Leads39Folio.Devise.Omniauth402161211211120111121211151322111211342115131282111711243251313241111211+283 more modules (most-connected shown)

At a glance — Code Health · 31.1 · Weak · gated by R1, R7, X5 ·

At a glance — Architecture · 83.7 · Adequate · gated by D26 ·

At a glance — Maturity · 83.1 · Strong ·

At a glance — Readiness · 47.4 · Weak · gated by R4, R6, P3, P7 ·

At a glance — Security · 51.3 · Adequate · gated by D29, C1 ·

At a glance — Domain Modelling · 54.8 · Adequate ·

At a glance — Accessibility · 32.5 · Weak · gated by AC1, AC4, AC6 ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures124High / Critical
A05:2025 — Injection61High / Critical

Roadmap

Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+3.2 ptsMediumType Safety
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+3.2 ptsMediumDead Code
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.1 ptsMediumKeyboard semantics
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+2.8 ptsMediumText alternatives
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+2.3 ptsMediumVisual & motion safety
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.+2.3 ptsMediumNullable reference types
Resolve the 1 Banned license finding(s) in License Compliance.+0.9 ptsLowLicense Compliance
Keep the ORM/table mapping on a boundary data-model + mapper; leave the domain entity framework-free (map row↔domain through a repository).+1.4 ptsMediumDomain ↔ infrastructure boundary

File quality

Per-file score 0–10 — a quality signature. Of 217 files carrying findings, judged against the Production bar: 3% slop · 53% mixed · 44% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.7SlopDependency Vulnerabilities: High vulnerability: REDACTED
REDACTED2.9SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.2MixedStatic Analysis (SAST): Medium: REDACTED
app/cells/folio/image_cell.rb5.6MixedCyclomatic Complexity: ImageCell.wrap_style (cyclomatic 20)
app/models/folio/file_placement/base.rb5.6MixedCyclomatic Complexity: Base.console_warnings (cyclomatic 16)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
app/components/folio/console/ui/image_component.rb5.7MixedCyclomatic Complexity: ImageComponent.set_data (cyclomatic 33)
app/models/folio/file.rb5.9MixedCyclomatic Complexity: File.validate_attribution_and_texts_if_needed (cyclomatic 16)
REDACTED5.9MixedStatic Analysis (SAST): Medium: REDACTED
app/jobs/folio/generate_thumbnail_job.rb6.0MixedExplicit Debt: TodoComment
app/lib/folio/tiptap/node_builder.rb6.0MixedExplicit Debt: TodoComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 143

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 — 723

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 — 130

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 8

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 78 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 — 78 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D24D26D28D29D30D34D35D43D44AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4AX6C1C2C3DM6GD1IC1M1M2M3M4P1P10P3P6P7P8PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X16X17X18X21X23X25X27X28X29X3X30X5

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
  1. 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, 930 of 996 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1e631-8387-77d3-a88a-fdb507224fcb.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rb, .js) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • 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 100 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 730 test source file(s) (.rb) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rb, .js) and this repository declares a Ruby test suite (minitest: 2 bundle roots, 492 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 gem dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22'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.
  • 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. `app/assets/javascripts/folio/console/react.js` 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.
  • C1 Data Protection — 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.
  • C2 Access Controls — 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.
  • C3 Audit Trail — 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 31 further occurrence(s) are not listed individually; the score already reflects all 71.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 203 further occurrence(s) are not listed individually; the score already reflects all 243.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 86 further occurrence(s) are not listed individually; the score already reflects all 126.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 11 further occurrence(s) are not listed individually; the score already reflects all 51.
  • X24 Document value interpolated into markup unescaped — 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. Document value interpolated into markup unescaped could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index').
  • X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.

Repo exclusion declarations: 15 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of 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.
  • 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.

Dimensions

D1 · Cyclomatic Complexity6.2 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.2 / 10 · rule-coverage 100% · ceiling Prevented

85 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was index.default at 80.

index.default (cyclomatic 80)react/src/containers/FileModal/FileModalFile/index.js:27
Select.render (cyclomatic 74)react/src/components/Select/index.js:86
atoms.atomsReducer (cyclomatic 61)react/src/ducks/atoms.js:484
input.registerAiInputController (cyclomatic 55)packs/ai/app/assets/javascripts/folio/ai/input.js:27
index.default (cyclomatic 55)react/src/components/ReadOnlyMetadataDisplay/index.js:3

+ 61 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with index.default (cyclomatic 80), Select.render (cyclomatic 74), atoms.atomsReducer (cyclomatic 61). — 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.2 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity6.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Prevented

149 method(s) exceeded the cognitive complexity threshold of 15; the worst was AutocompletesController.react_select at 104.

buildPayload (cognitive 18) · ×2REDACTED:321
AutocompletesController.react_select (cognitive 104)app/controllers/folio/console/api/autocompletes_controller.rb:257
atomsReducer (cognitive 99)react/src/ducks/atoms.js:484
ListComponent.records_data (cognitive 80)REDACTED:14
index.default (cognitive 77)react/src/containers/FileModal/FileModalFile/index.js:27

+ 119 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 8 bodies over 60 down to 60 or less in Cognitive Complexity — start with AutocompletesController.react_select (cognitive 104), atomsReducer (cognitive 99), ListComponent.records_data (cognitive 80). — 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 8 together lifts Cognitive Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes7.2 / 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.

Maturity: Documented → Verified → Prevented · effective 7.2 / 10 · rule-coverage 100% · ceiling Prevented

28 god class(es) detected.

TooManyMethods: FormSnapshotSanitizer · ×12packs/ai/app/lib/folio/ai/form_snapshot_sanitizer.rb:6
FunctionTooLong: atoms.atomsReducer · ×11react/src/ducks/atoms.js:484
FileTooLong: ducks/atoms.js · ×3react/src/ducks/atoms.js
MethodTooLong: AtomForm.render · ×2react/src/components/AtomForm/index.js:163

What to do

  1. Resolve the 12 TooManyMethods finding(s) in God Classes — start with form_snapshot_sanitizer.rb, file.rb, site_settings_component.rb. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 11 FunctionTooLong finding(s) in God Classes — start with REDACTED (3), atoms.js, input.js. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 3 FileTooLong finding(s) in God Classes — start with atoms.js, iptc_field_mapper.rb, catalogue_cell.rb. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication8.6 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Verified

33 duplicated block group(s) detected. 3.5 % of the production lines (1,631 of 46,329) are in a reported copy. A further 33 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Edited copy of a member (11 corresponding lines) · ×5app/components/folio/console/ui/index/filters_component.rb:209
Duplicated block (11 lines × 2) · ×5app/jobs/folio/cra_media_cloud/check_progress_job.rb:253
Duplicated block (9 lines × 2) · ×3lib/generators/folio/ui/ui_generator.rb:57
Duplicated block (7 lines × 2) · ×3REDACTED:315
Edited copy of a member (21 corresponding lines) · ×2app/jobs/folio/cra_media_cloud/check_progress_job.rb:245

+ 41 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with filters_component.rb, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 5 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with check_progress_job.rb, generate_missing_thumb_webp_job.rb, string_input_override.rb. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 3 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with ui_generator.rb, document_component.rb, image_cell.rb. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

3 production modules (npm+RubyGems), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations, and main-sequence distance (abstractness) is not computed for these modules yet.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)7.7 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 100% · ceiling Verified

31 of 161 classes have LCOM4 above 3.

Low cohesion: File (LCOM4 27) · ×31app/models/folio/file.rb:3

What to do

  1. Resolve the 31 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED (2), images_controller.rb (2), audios_controller.rb (2). — One of this dimension's main actionable groups (31 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 100 tests. Measured on the JavaScript/TypeScript suite only — at least 730 test source file(s) (.rb) went unread, so its test quality is unmeasured and is not in these counts.

Mock-dominated test: explains an exhausted limit for %sreact/src/containers/Atoms/tests/AtomsInsertion.test.js:53

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

57 outdated direct gem(s), 0 pinning defect(s). 108 declaration(s) graded against rubygems.org, 99 of them against a version resolved in a committed REDACTED. 9 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Outdated: aasm · ×57

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 203 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 203 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed REDACTED. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 1 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: sidekiq

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: react/src/components/AtomForm/index.js (2×38=76); app/components/folio/uppy_component.js (2×18=36) Repeated repair below the complexity floor: app/assets/javascripts/folio/input/date_time.js (9 of 9 changes were fixes)

Hotspot: react/src/components/AtomForm/index.js · ×2react/src/components/AtomForm/index.js:163
Repeated repair: app/assets/javascripts/folio/input/date_time.jsapp/assets/javascripts/folio/input/date_time.js:229

What to do

  1. Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED, uppy_component.js. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with date_time.js. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is app/lib/folio/tiptap/node_builder.rb. Counted over 198 of the 832 production source files in this repository: 632 are under the ~2,400-byte size floor this dimension measures over, and the remaining 2 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.9 / 10Stronggated by 32 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

32 deducted task-comment markers across 46329 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×23test/test_helper_base.rb:126
FixmeComment · ×5lib/folio/sitemap_generator.rb:41
HackComment · ×4test/models/folio/ability_test.rb:227

What to do

  1. Resolve the 23 TodoComment finding(s) in Explicit Debt — start with imprintable.rb (3), test_helper_base.rb (2), tag_override.rb (2). — One of this dimension's main actionable groups (23 warning-level).
  2. Resolve the 5 FixmeComment finding(s) in Explicit Debt — start with imprintable.rb (2), sitemap_generator.rb, has_recaptcha_validation.rb. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 4 HackComment finding(s) in Explicit Debt — start with users_controller_test.rb (2), ability_test.rb, has_site_roles_test.rb. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 31 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundbin/rails:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with rails. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment Value8.2 8.1 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.1 / 10 · rule-coverage 98% · ceiling Documented

6 of 338 judged comments only repeat the code they sit on (1.8 %). 9 comment(s) in another language or script were not judged.

redundant comment · ×6app/assets/javascripts/folio/thumbnails.js:99

What to do

  1. Resolve the 6 redundant comment finding(s) in Comment Value — start with thumbnails.js (3), REDACTED, subtitle_form_component.js. — One of this dimension's main actionable groups (6 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 2 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2package.json:1

What to do

  1. Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.1 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.1 / 10 · rule-coverage 100% · ceiling Documented

61 finding(s): 0 critical, 14 high, 47 medium, 0 low. semgrep hit a parse error in 29 file(s) — `app/assets/javascripts/folio/console/react.js`, `app/components/folio/console/files/show/metadata_component_data.yml`, `config/locales/activerecord.cs.yml`, `config/locales/addresses.cs.yml`, `config/locales/console.cs.yml`, … (+24 more) — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 11 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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 REDACTED 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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

124 finding(s): 8 critical, 75 high, 35 medium, 6 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 72 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (35), REDACTED (20), REDACTED (17). — One of this dimension's main actionable groups (72 issue-level).
  2. Resolve the 8 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7), REDACTED. — One of this dimension's main actionable groups (8 issue-level).
  3. Resolve the 3 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 200 of the 832 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.7 / 10Adequategated by 4 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: document.rb↔image.rb 84%; ajax_input_component.js↔ajax_input_component.rb 77%; simple_form_wrap_component.js↔simple_form_wrap_component.rb 75%

Boundary-crossing change coupling: form_component.rb ↔ node.rb · ×4app/components/folio/console/tiptap/overlay/form_component.rb:1
Change coupling: simple_form_wrap_component.js ↔ simple_form_wrap_component.rb · ×7app/components/folio/console/tiptap/simple_form_wrap_component.js:1
Change-coupling hub: file_component.rb → show_modal_component.js, file_component.js, file_list_component.rb · ×3app/components/folio/file_list/file_component.rb
Change coupling clique: document.rb, image.rb, video.rb · ×2app/models/folio/file/document.rb

What to do

  1. Resolve the 4 Boundary-crossing change coupling finding(s) in Change Coupling — start with form_component.rb, bar_component.rb, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 7 Change coupling finding(s) in Change Coupling — start with REDACTED (2), simple_form_wrap_component.js, picker_component.js. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with file_component.rb, react_helper.rb, REDACTED. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 109 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives1.8 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×5) — app/assets/javascripts/folio/s3_upload.js:35, app/cells/folio/console/file_placements/list/show.slim:7, app/cells/folio/image/_image.slim:1, …

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.3 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — app/assets/javascripts/folio/console/modules/input/url.js:39, app/cells/folio/console/users/invite_and_copy/show.slim:3, app/components/folio/console/links/modal/url_picker_component.slim:81, …
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — app/cells/folio/console/nested_model_controls/show.slim:12, app/components/folio/file_list/file/batch_checkbox_component.slim:2, app/components/folio/input/embed/inner_component.slim:13
  • This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — app/cells/folio/devise/password_input/show.slim:9, tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:151
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — app/components/folio/console/tiptap/overlay/form/nested_nodes_component.slim:1
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — data/embed/source/embed.js:218
  • This <h2> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. — tiptap/src/components/tiptap-ui/link-popover/link-popover.tsx:244

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.7 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. (×3) — app/cells/folio/ui/show.slim:55, app/components/folio/embed/box_component.js:99, data/embed/source/embed.js:161
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — app/components/folio/console/files/subtitles_form_component.slim:47
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×2) — app/views/layouts/folio/console/application.slim:2, app/views/layouts/folio/console/devise.slim:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — app/views/layouts/folio/console/application.slim:2, app/views/layouts/folio/console/devise.slim:2, lib/generators/folio/assets/templates/public/maintenance.html:2
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — data/embed/source/embed.html:2, lib/generators/folio/assets/templates/public/maintenance.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <span>, so there is no content here to wrap — render the <main> from the component mounted into it. — data/embed/source/embed.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×2) — data/embed/source/embed.html:8, lib/generators/folio/assets/templates/public/maintenance.html:8
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — react/public/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="folio-tiptap-dev-root">, so there is no content here to wrap — render the <main> from the component mounted into it. — tiptap/index.html:2
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.4 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×15) — app/cells/folio/console/atoms/previews/_inner_insert.slim:21, app/cells/folio/console/catalogue_sort_arrows/show.slim:1, app/cells/folio/console/merges/form/show.slim:37, …
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. — app/cells/folio/devise/password_input/show.slim:9
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×6) — tiptap/src/components/tiptap-editors/folio-editor/folio-editor.tsx:500, tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:121, tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136, …
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — tiptap/src/components/tiptap-ui/paragraph-placeholder/has-paragraph-placeholder.tsx:199

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety2.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.tiptap.ProseMirror` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/styles/index.scss:291
  • `.tiptap-popover` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:29
  • `.tiptap-dropdown-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:31
  • `.tiptap-button:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-ui-primitive/button/button.scss:33
  • `.f-tiptap-link-popover__input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-ui/link-popover/link-popover.scss:16
  • `.tiptap-color-highlight-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.scss:5
  • `.f-tiptap-commands-list__item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — tiptap/src/components/tiptap-extensions/folio-tiptap-commands/folio-tiptap-commands-list.scss:93
  • `.rst__rowCancelPad` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — app/assets/javascripts/folio/console/react.css:2
  • `.rst__placeholderCancelPad` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — app/assets/javascripts/folio/console/react.css:2
  • `.ReactVirtualized__Grid` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — app/assets/javascripts/folio/console/react.css:2
  • `.tiptap-popover[data-state="open"]` moves (`animation: fadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomIn 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:45
  • `.tiptap-popover[data-state="closed"]` moves (`animation: fadeOut 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomOut 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:51
  • `.tiptap-popover[data-side="top"]` moves (`animation: slideFromBottom 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:60
  • `.tiptap-popover[data-side="right"]` moves (`animation: slideFromLeft 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:66
  • `.tiptap-popover[data-side="bottom"]` moves (`animation: slideFromTop 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:72
  • `.tiptap-popover[data-side="left"]` moves (`animation: slideFromRight 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:78
  • `.tiptap-dropdown-menu[data-state="open"]` moves (`animation: fadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomIn 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:55
  • `.tiptap-dropdown-menu[data-state="closed"]` moves (`animation: fadeOut 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomOut 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:61
  • `.tiptap-dropdown-menu[data-side="top"]` moves (`animation: slideFromBottom 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:70
  • `.tiptap-dropdown-menu[data-side="right"]` moves (`animation: slideFromLeft 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:76
  • `.tiptap-dropdown-menu[data-side="bottom"]` moves (`animation: slideFromTop 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:82
  • `.tiptap-dropdown-menu[data-side="left"]` moves (`animation: slideFromRight 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:88
  • `.tiptap-button-highlight` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.scss:8
  • `.f-embed__loader:before` moves (`animation: load8 1.1s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — data/embed/source/embed.css:77
  • `.folio-console-help-documents-index .card` moves (`transition: transform 0.2s ease, box-shadow 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — app/assets/stylesheets/folio/console/_help_documents.scss:3
  • `.rst__highlightLineVertical:after` moves (`animation: arrow-pulse 1s linear infinite both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — app/assets/javascripts/folio/console/react.css:2

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition8.8 / 10Strong✓ Tool-verified

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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

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.

C1 · Data Protection0.0 / 10Critical✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No encryption usage (Active Record Encryption's encrypts, lockbox, attr_encrypted, vault-rails, ActiveSupport::MessageEncryptor, OpenSSL::Cipher, RbNaCl) was found, and this repository persists personal data in the model cited here — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore. — db/migrate/20170710125730_create_folio_sites.rb:8

What to do

  • Encrypt sensitive data at rest (Active Record Encryption — encrypts :email, deterministic: true where it must be queried — or lockbox's has_encrypted) and manage keys in a vault (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, HashiCorp Vault). Skip if delegated to infra (Postgres TDE, KMS, etc.).
  • Enforce HTTPS (config.force_ssl = true in config/environments/production.rb, or Rack::SSL in a Rack application) so data in transit is always encrypted.
C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

C3 · Audit Trail10.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

DM6 · Domain ↔ infrastructure boundary5.5 / 10Adequate✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (ActiveRecord/Sequel/ROM) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

  • `Base` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository). — app/models/folio/atom/base.rb:3
  • `File` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository). — app/models/folio/file.rb:3
  • `Lead` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository). — app/models/folio/lead.rb:3
  • `User` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository). — app/models/folio/user.rb:3
  • `VideoSubtitle` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository). — app/models/folio/video_subtitle.rb:3

What to do

  • Keep the ORM/table mapping on a boundary data-model + mapper; leave the domain entity framework-free (map row↔domain through a repository).
GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's Ruby: methods whose whole body still raises NotImplementedError where nothing overrides them, or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • `update_file` is a shipped method whose whole body still raises a "not implemented" error, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. — app/lib/folio/mux/api.rb:66
  • A placeholder string ("<p>Lorem ipsum dolor sit amet, consectet…") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — app/cells/folio/ui_cell.rb:118, REDACTED:108

What to do

  • Finish or delete the methods that still raise NotImplementedError where nothing overrides them, and replace placeholder text before shipping.
IC1 · Incompleteness & stubs9.0 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Ruby: methods that only raise NotImplementedError or a "not implemented" error where nothing overrides them, methods that take inputs and return a constant or do nothing, dead `if false` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `update_file` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — app/lib/folio/mux/api.rb:66
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×4) — test/cells/folio/console/users/header_actions_cell_test.rb:9, test/cells/folio/console/users/invite_and_copy_cell_test.rb:7, test/controllers/folio/users/passwords_controller_test.rb:16, …

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete `xit`/`skip`ped tests, decide whether each empty method or NotImplementedError refusal is deliberate (and say so in a comment), and replace `# rubocop:disable all` with targeted, justified disables.
M1 · Documentation (README)10.0 / 10Exemplary✓ Tool-verified

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.

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

What to do

  • Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `vendor/assets/bower_components/tom-select/.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `bundler`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — vendor/assets/bower_components/tom-select/.github/dependabot.yml:7

What to do

  • Add a SAST step to CI running what this repository's stack ships: brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `bundler`, `gitsubmodule` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `Net::HTTP.post_form` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:23
  • `HTTParty.get` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — app/controllers/folio/console/api/jw_player_controller.rb:9, app/lib/folio/ares.rb:32
  • `Net::HTTP.start` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:43
  • `Net::HTTP.new` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — app/lib/folio/jw_player/api.rb:122

What to do

  • Set `open_timeout` and `read_timeout` explicitly on every client (Net::HTTP, Faraday `request: { timeout: }`, HTTParty `timeout:`), add Faraday's `:retry` middleware (faraday-retry) or `retriable`, and a breaker (`circuitbox`, `stoplight`) around dependencies that fail.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

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.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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.

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 395 plain JS — the untyped files are app/assets/config/folio_manifest.js, app/assets/javascripts/folio/add_params_to_url.js, app/assets/javascripts/folio/api.js, app/assets/javascripts/folio/atoms.js, app/assets/javascripts/folio/capitalize.js, app/assets/javascripts/folio/click_trigger.js (+389 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication6.3 / 10Adequate✓ Tool-verified

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.

  • 10 duplicated blocks under app/ have copies in at least two of the sibling directories assets, cells, components — 2 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — app/assets/javascripts/folio/mermaid.js:44
  • 5 duplicated blocks under react/src/ have copies in at least two of the sibling directories components, containers — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — react/src/components/AtomForm/MultiAttachmentsSelect.js:81
  • 5 duplicated blocks under react/src/containers/ have copies in at least two of the sibling directories AncestryApp, FileModal, FilesApp, IndexMode, MenuFormApp, OrderedMultiselectApp (+3 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — react/src/containers/AncestryApp/SerializedAncestry/index.js:3
  • app/components/folio/console/files/subtitle_form_component.js:11 · REDACTED:14 — the two spans are one implementation copied and then locally edited — 920 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. — app/components/folio/console/files/subtitle_form_component.js:11
  • packs/ai/app/assets/javascripts/folio/ai/input.js:181 · packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js:100 — the two spans are one implementation copied and then locally edited — 476 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. — packs/ai/app/assets/javascripts/folio/ai/input.js:181
  • react/src/ducks/filePlacements.js:9 · react/src/ducks/uploads.js:11 — the two spans are one implementation copied and then locally edited — 308 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. — react/src/ducks/filePlacements.js:9
  • react/src/containers/AncestryApp/SerializedAncestry/index.js:3 · react/src/containers/MenuFormApp/SerializedMenu/index.js:28 — the two spans are one implementation copied and then locally edited — 221 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. — react/src/containers/AncestryApp/SerializedAncestry/index.js:3
  • react/src/ducks/fileModal.js:360 · react/src/ducks/fileModal.js:423 — 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. — react/src/ducks/fileModal.js:360
  • react/src/components/Select/index.js:118 · react/src/components/Select/index.js:185 — 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. — react/src/components/Select/index.js:118
  • app/components/folio/console/ui/index/filters_component.js:25 · app/components/folio/console/ui/index/header/query_form_component.js:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/components/folio/console/ui/index/filters_component.js:25
  • app/components/folio/console/links/modal/url_picker_component.js:56 · app/components/folio/console/links/modal_component.js:37 — the two spans are one implementation copied and then locally edited — 158 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. — app/components/folio/console/links/modal/url_picker_component.js:56
  • react/src/ducks/atoms.js:938 · react/src/ducks/atoms.js:975 · react/src/ducks/atoms.js:1000 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — react/src/ducks/atoms.js:938
  • app/assets/javascripts/folio/api.js:171 · app/assets/javascripts/folio/api.js:213 — the two spans are one implementation copied and then locally edited — 218 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — app/assets/javascripts/folio/api.js:171
  • react/src/components/AtomForm/MultiAttachmentsSelect.js:81 · react/src/containers/MultiSelect/index.js:55 — 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. — react/src/components/AtomForm/MultiAttachmentsSelect.js:81
  • react/src/ducks/atoms.js:526 · react/src/ducks/atoms.js:856 — 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. — react/src/ducks/atoms.js:526
  • app/components/folio/console/files/show_modal_component.js:91 · app/components/folio/console/files/show_modal_component.js:176 — the two spans are one implementation copied and then locally edited — 87 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — app/components/folio/console/files/show_modal_component.js:91
  • react/src/components/DateInput/index.js:6 · react/src/containers/NotesFieldsApp/Table/DueDate/index.js:5 — 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. — react/src/components/DateInput/index.js:6
  • react/src/components/Select/index.js:267 · react/src/components/Select/index.js:285 — 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. — react/src/components/Select/index.js:267
  • app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:18 · app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:35 — 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. — app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:18
  • app/components/folio/embed/box_component.js:133 · data/embed/source/embed.js:4 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/components/folio/embed/box_component.js:133
  • app/assets/javascripts/folio/console/redactor/_table.js:402 · app/assets/javascripts/folio/console/redactor/_video.js:147 — 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. — app/assets/javascripts/folio/console/redactor/_table.js:402
  • app/components/folio/console/files/picker/document_component.js:5 · app/components/folio/console/files/picker/image_component.js:3 — 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. — app/components/folio/console/files/picker/document_component.js:5
  • react/src/containers/FileModal/FileModalFile/index.js:319 · react/src/containers/FileModal/FileModalFile/index.js:335 — 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. — react/src/containers/FileModal/FileModalFile/index.js:319
  • react/src/containers/IndexMode/index.js:56 · react/src/containers/SingleSelect/index.js:49 — 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. — react/src/containers/IndexMode/index.js:56
  • react/src/ducks/atoms.js:745 · react/src/ducks/atoms.js:811 — 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. — react/src/ducks/atoms.js:745
  • react/src/ducks/files.js:318 · react/src/ducks/uploads.js:98 — 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. — react/src/ducks/files.js:318
  • react/src/index.js:60 · react/src/index.js:81 — 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. — react/src/index.js:60
  • app/components/folio/nested_fields_component.js:549 · app/components/folio/nested_fields_component.js:603 — 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. — app/components/folio/nested_fields_component.js:549
  • react/src/ducks/filePlacements.js:208 · react/src/ducks/files.js:398 · react/src/ducks/files.js:414 · react/src/ducks/files.js:514 — the 4 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. — react/src/ducks/filePlacements.js:208
  • app/assets/javascripts/folio/input/collection_filterable.js:16 · app/assets/javascripts/folio/input/collection_remote_select.js:135 — 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. — app/assets/javascripts/folio/input/collection_filterable.js:16
  • app/components/folio/console/files/picker_component.js:188 · app/components/folio/file_list/file_component.js:249 — the two spans are one implementation copied and then locally edited — 55 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. — app/components/folio/console/files/picker_component.js:188
  • react/src/components/FolioConsoleUiButton/index.js:54 · react/src/components/FolioConsoleUiButton/index.js:73 — 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. — react/src/components/FolioConsoleUiButton/index.js:54
  • react/src/containers/FileModal/FileModalFile/index.js:277 · react/src/containers/FileModal/FileModalFile/index.js:291 · react/src/containers/FileModal/FileModalFile/index.js:305 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — react/src/containers/FileModal/FileModalFile/index.js:277
  • app/assets/javascripts/folio/console/redactor/_table.js:296 · app/assets/javascripts/folio/console/redactor/_table.js:328 — 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. — app/assets/javascripts/folio/console/redactor/_table.js:296
  • app/components/folio/console/files/show_component.js:156 · app/components/folio/console/files/show_component.js:171 — 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. — app/components/folio/console/files/show_component.js:156
  • react/src/containers/FileFilter/index.js:70 · react/src/containers/FileFilter/index.js:90 — 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. — react/src/containers/FileFilter/index.js:70
  • app/assets/javascripts/folio/console/atoms/previews/base.js:357 · app/assets/javascripts/folio/console/atoms/previews/base.js:369 — 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. — app/assets/javascripts/folio/console/atoms/previews/base.js:357
  • app/assets/javascripts/folio/console/redactor/_table.js:263 · app/assets/javascripts/folio/console/redactor/_video.js:119 — 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. — app/assets/javascripts/folio/console/redactor/_table.js:263
  • app/assets/javascripts/folio/thumbnails.js:19 · app/assets/javascripts/folio/thumbnails.js:57 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — app/assets/javascripts/folio/thumbnails.js:19
  • app/components/folio/console/ui/ajax_input_component.js:52 · app/components/folio/console/ui/ajax_input_component.js:91 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — app/components/folio/console/ui/ajax_input_component.js:52

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.
R11 · Import Boundaries9.1 / 10Exemplary✓ Tool-verified

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.

  • react/src/folioTestSetup.js:2 reaches into another package with a relative path (../../app/assets/javascripts/folio/message_bus) — import the package by name instead. — react/src/folioTestSetup.js:2
  • react/src/folioTestSetup.js:4 reaches into another package with a relative path (../../app/assets/javascripts/folio/api) — import the package by name instead. — react/src/folioTestSetup.js:4
  • react/src/folioTestSetup.js:5 reaches into another package with a relative path (../../app/components/folio/console/ui/flash_component) — import the package by name instead. — react/src/folioTestSetup.js:5

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity8.2 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • (anonymous) has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — react/src/components/ReadOnlyMetadataDisplay/index.js:3
  • modalReducer has cyclomatic complexity 40 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/ducks/fileModal.js:263
  • loadOptions has cyclomatic complexity 37 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/components/Select/index.js:172
  • atomsReducer has cyclomatic complexity 31 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. — react/src/ducks/atoms.js:484
  • (anonymous) has cyclomatic complexity 28 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/containers/FileModal/FileModalFile/index.js:27
  • performAutoScroll has cyclomatic complexity 24 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/nested_fields_component.js:532
  • FileTableRow has cyclomatic complexity 21 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. — react/src/components/FileList/FileTableList/FileTableRow/index.js:11
  • filesReducer has cyclomatic complexity 21 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/ducks/files.js:325
  • createEmbedElement has cyclomatic complexity 20 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. — data/embed/source/embed.js:98
  • renderMetadataRow has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/components/ReadOnlyMetadataDisplay/index.js:88
  • queueAutosaveIfPossible has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/console/form/footer_component.js:85
  • fillFromParent has cyclomatic complexity 18 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/console/file_placements/multi_picker_fields/placement_component.js:28
  • init has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/uppy_component.js:68
  • (anonymous) 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. — react/src/components/AtomForm/index.js:245
  • run has cyclomatic complexity 17 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/assets/javascripts/folio/remote_scripts.js:125
  • batchAction has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/console/files/batch/bar_component.js:127
  • AtomInput has cyclomatic complexity 17 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. — react/src/components/AtomForm/AtomInput.js:37
  • (anonymous) has cyclomatic complexity 16 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/utils/settingsToHash.js:12
  • render has cyclomatic complexity 16 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. — react/src/components/Select/index.js:86
  • PaginationComponent has cyclomatic complexity 16 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. — REDACTED:24
  • open has cyclomatic complexity 15 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/console/ui/notification_modal_component.js:67
  • onKeydown has cyclomatic complexity 14 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — test/dummy/app/components/dummy/ui/menu_toolbar/header_search_component.js:113
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/assets/javascripts/folio/s3_upload.js:219
  • insertCharacter 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. — app/components/folio/special_characters/popup_component.js:110
  • sendStartMessage has cyclomatic complexity 14 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. — app/assets/javascripts/folio/input/tiptap.js:211
  • handleResponse has cyclomatic complexity 13 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. — app/components/folio/console/form_modal_component.js:58
  • (anonymous) has cyclomatic complexity 13 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. — react/src/containers/FileModal/index.js:122
  • handleOverflow has cyclomatic complexity 13 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. — test/dummy/app/components/dummy/ui/menu_component.js:33
  • onMessage 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. — app/components/folio/console/files/batch/bar_component.js:258
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/cells/folio/console/index/position_buttons/_regular.js:175
  • innerBind has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/player_component.js:155
  • updateAtomPreviews has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/ducks/atoms.js:268
  • handleAutocompleteActive has cyclomatic complexity 12 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. — app/assets/javascripts/folio/input/autocomplete.js:162
  • submit has cyclomatic complexity 12 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. — app/components/folio/console/ui/index/filters_component.js:10
  • reactSelectOptionToRecord 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. — react/src/components/AtomForm/Associations.js:15
  • shouldAbortBasedOnElement has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/components/folio/console/form/footer_component.js:237
  • FileThumbnail has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/components/FileList/FileThumbnailList/FileThumbnail/index.js:9
  • SerializedMenuItem has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — react/src/containers/MenuFormApp/SerializedMenu/index.js:3
  • shouldHideOnChange has cyclomatic complexity 12 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. — app/assets/javascripts/folio/input/date_time.js:229
  • componentDidUpdate has cyclomatic complexity 12 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. — react/src/containers/FileModal/index.js:78
R3 · Large Files9.2 / 10Exemplary✓ 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.

  • react/src/ducks/atoms.js has 982 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — react/src/ducks/atoms.js:1
  • app/components/folio/uppy_component.js 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. — app/components/folio/uppy_component.js:1
  • app/components/folio/nested_fields_component.js has 545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/components/folio/nested_fields_component.js:1
  • app/components/folio/console/files/show/thumbnails/crop_edit_component.js has 522 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/components/folio/console/files/show/thumbnails/crop_edit_component.js:1
  • react/src/containers/FileModal/FileModalFile/index.js has 471 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — react/src/containers/FileModal/FileModalFile/index.js:1
  • react/src/ducks/files.js has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — react/src/ducks/files.js:1
  • app/assets/javascripts/folio/console/atoms/previews/base.js has 419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/assets/javascripts/folio/console/atoms/previews/base.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage3.2 / 10Weak✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — app/components/folio/nested_fields_component.js:1, app/components/folio/console/files/show/thumbnails/crop_edit_component.js:1, app/components/folio/uppy_component.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling3.4 / 10Weak✓ 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.

  • test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
R7 · Dead Code0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 88 application, 1 tooling and 41 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×39) — app/components/folio/nested_fields_component.js, app/components/folio/console/files/show/thumbnails/crop_edit_component.js, app/components/folio/uppy_component.js, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene7.5 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in react/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — react/package.json:11, react/package.json:14
  • Declared in test/dummy/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. — test/dummy/package.json:6
  • Declared in tiptap/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — tiptap/package.json:23, tiptap/package.json:29

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.1 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • react/src/ducks/filePlacements.js → react/src/ducks/files.js → react/src/ducks/filePlacements.js (one verified cycle inside a mutually-dependent group of 4 files) — react/src/ducks/filePlacements.js:5

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's Ruby source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for Ruby: this reading covers the code's own cryptography and the TLS connections it opens as a client, and a Rails, Rack or Sinatra application's transport, header and validation settings are not modelled. Their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — REDACTED:92, REDACTED:67
  • `https://www.google.com/recaptcha/api.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — app/views/layouts/folio/_recaptcha.slim:2

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `REDACTED:92` (Digest::MD5.hexdigest), `REDACTED:67` (Digest::MD5.hexdigest). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `convert_and_sanitize_value` is public, takes a document from its caller (line 8) and hands it to `traverse_and_scrub`, which walks `data` as a `Hash` and calls itself at line 158 (`self.traverse_and_scrub`) with a piece of `data` (and at line 160) — and nowhere in `traverse_and_scrub` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `traverse_and_scrub` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — app/lib/folio/tiptap/content.rb:158

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling5.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×15) — react/src/ducks/files.js:201, lib/folio/engine.rb:469, app/models/folio/file.rb:400, …
  • `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — app/services/folio/metadata/iptc_field_mapper.rb:896, app/controllers/concerns/folio/console/api/file_controller_base.rb:417
  • `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×5) — app/services/folio/metadata/iptc_field_mapper.rb:943, app/services/folio/metadata/iptc_field_mapper.rb:944, app/services/folio/metadata/iptc_field_mapper.rb:946, …
  • `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×11) — app/serializers/folio/console/file_placement_serializer.rb:26, app/serializers/folio/console/file_placement_serializer.rb:42, app/models/folio/help_document.rb:93, …
  • `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — app/models/concerns/folio/has_attachments.rb:103, app/lib/folio/embed.rb:70, app/lib/folio/tiptap/node_builder.rb:166, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — REDACTED:52
  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — app/cells/folio/console/index/position_buttons/_regular.js:182

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 832 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

What to do

  • Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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.

LensScoreRatingImpact
Code Health31.1Weak — gated by R1, R7, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture83.7Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity83.1StrongSolid.
Readiness47.4Weak — gated by R4, R6, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security51.3Adequate — gated by D29, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling54.8AdequateAcceptable, with room to improve.
Accessibility32.5Weak — gated by AC1, AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
Unscored — 3 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.

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 44 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. The cause is in the repository, not in our sandbox: package.json has no "start" script, so `npm run start` could not start the app. Nothing here says the surface is inaccessible, only that it was never rendered.
  • D11 Test Reliability — Test reliability not included — the .rb suite was found but not re-run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 1 candidate(s) found and not reported.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Ruby surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (packs), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • 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 project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P2 Observability — This repository's JavaScript/TypeScript, Ruby source (3 module(s), 1190 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `x.report(…)` entries in a `Benchmark.ips`/`bm`/`bmbm`/`benchmark`/`memory` block, `benchmark:` entries in a benchmark-driver YAML under a bench* directory, rspec-benchmark `perform_*` expectations where the gem is installed, or benchmark-ips, benchmark-memory, rspec-benchmark or benchmark-driver in a Gemfile or gemspec, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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
  • 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 — no C# was loaded; this repository's Ruby was read, and no request in it can be cancelled by a caller — a Ruby request takes no token: Net::HTTP, Faraday and async-http are stopped from outside the call (Async::Task#stop, Thread#raise, Timeout), not through a parameter
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — Document value interpolated into markup unescaped could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 143 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×72
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 47 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×5
  • <img> without a text alternative app/assets/javascripts/folio/s3_upload.js:35 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative app/cells/folio/console/file_placements/list/show.slim:7 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative app/cells/folio/image/_image.slim:1 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative app/components/folio/console/files/picker/image_component.js:50 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative app/components/folio/file_list/file_component.js:77 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · <input> without a programmatic label · ×5
  • <input> without a programmatic label app/cells/folio/console/users/invite_and_copy/show.slim:3 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label app/components/folio/console/links/modal/url_picker_component.slim:81 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label app/components/folio/console/ui/input_clipboard_copy_component.slim:2 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label app/components/folio/newsletter_subscriptions/form_component.slim:5 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label tiptap/src/components/tiptap-ui/link-popover/link-popover.tsx:244 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
DM6 · Domain ↔ infrastructure boundary · Domain fused to persistence infrastructure · ×5
  • Domain fused to persistence infrastructure: Base app/models/folio/atom/base.rb:3 — `Base` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository).
  • Domain fused to persistence infrastructure: File app/models/folio/file.rb:3 — `File` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Lead app/models/folio/lead.rb:3 — `Lead` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository).
  • Domain fused to persistence infrastructure: User app/models/folio/user.rb:3 — `User` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository).
  • Domain fused to persistence infrastructure: VideoSubtitle app/models/folio/video_subtitle.rb:3 — `VideoSubtitle` is a domain concept fused to persistence ON ITS OWN DECLARATION (Rails ActiveRecord — `ApplicationRecord`) — the domain entity IS the ActiveRecord row (active-record), and it carries domain behaviour on the persistence type. A schema/persistence change ripples straight into the domain. Keep the ORM/table mapping on a boundary data-model + a mapper, and the domain entity framework-free (map row↔domain through a repository).
D35 · Change Coupling · Boundary-crossing change coupling · ×4
  • Boundary-crossing change coupling: form_component.rb ↔ node.rb app/components/folio/console/tiptap/overlay/form_component.rb:1 — `app/components/folio/console/tiptap/overlay/form_component.rb` (context components) and `app/models/folio/tiptap/node.rb` (context models) sit in DIFFERENT parts of the tree yet change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `d6f4ea29` refactor(tiptap): mv autoclick_cover and single_image_node_name to no…; `6f1fdc27` refactor(tiptap): use type hashes for structure; `e528a734` feat(tiptap): translate relations, autoclick cover for single picker … — run `git show` on any of them.
  • Boundary-crossing change coupling: bar_component.rb ↔ routes.rb app/components/folio/console/files/batch/bar_component.rb:1 — `app/components/folio/console/files/batch/bar_component.rb` (context components) and `config/routes.rb` (context config) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `34cea437` feat(files): wip make batch actions thread-safe; `4220578d` feat(files): handle batch download failure; `bb58d162` feat(files): tweak batch/bar download UI — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ routes.rb REDACTED:1 — `REDACTED` (context controllers) and `config/routes.rb` (context config) sit in DIFFERENT parts of the tree yet change together 60% of the time (15 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `84f73303` feat(console/ui): add steps component; `94e27331` feat(console/ui): redo clipboard_copy to ui/clipboard; `83f7a822` feat(files): init multi_picker_fields_component — run `git show` on any of them.
  • Boundary-crossing change coupling: state_cell.rb ↔ aasm_controller.rb app/cells/folio/console/state_cell.rb:1 — `app/cells/folio/console/state_cell.rb` (context cells) and `app/controllers/folio/console/api/aasm_controller.rb` (context controllers) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f0fb4dcc` fix(console): restore console aasm email modal (#677); `f1eb6b82` add :button option to console/state cell; `4d8b5fae` add aasm mailer, hook aasm state modal — run `git show` on any of them.
AC2 · Forms & labels · <label> that labels no control · ×3
  • <label> that labels no control app/cells/folio/console/nested_model_controls/show.slim:12 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control app/components/folio/file_list/file/batch_checkbox_component.slim:2 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control app/components/folio/input/embed/inner_component.slim:13 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC3 · Page structure · <iframe> without a title · ×3
  • <iframe> without a title app/cells/folio/ui/show.slim:55 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title app/components/folio/embed/box_component.js:99 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title data/embed/source/embed.js:161 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×3
  • Click handler on a non-interactive <div> tiptap/src/components/tiptap-editors/folio-editor/folio-editor.tsx:500 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:121 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> tiptap/src/components/tiptap-ui/paragraph-placeholder/has-paragraph-placeholder.tsx:230 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <span> · ×2
  • Custom control with no accessible name on <span> app/cells/folio/devise/password_input/show.slim:9 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <span> tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:151 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure · Document without a <title> · ×2
  • Document without a <title> app/views/layouts/folio/console/application.slim:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> app/views/layouts/folio/console/devise.slim:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang data/embed/source/embed.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang lib/generators/folio/assets/templates/public/maintenance.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure · Viewport restricts zoom · ×2
  • Viewport restricts zoom data/embed/source/embed.html:8 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom lib/generators/folio/assets/templates/public/maintenance.html:8 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×2
  • Click handler on a non-interactive <span> app/cells/folio/devise/password_input/show.slim:9 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <span> tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:151 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label app/assets/javascripts/folio/console/modules/input/url.js:39 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · Link with no accessible name · ×1
  • Link with no accessible name data/embed/source/embed.js:218 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels · Custom control with no accessible name on <h2> · ×1
  • Custom control with no accessible name on <h2> tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136 — This <h2> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <h2> · ×1
  • Click handler on a non-interactive <h2> tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> tiptap/src/components/tiptap-ui/paragraph-placeholder/has-paragraph-placeholder.tsx:199 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC4 · Keyboard semantics · Click handler on a non-interactive <p> · ×1
  • Click handler on a non-interactive <p> tiptap/src/components/tiptap-ui/paragraph-placeholder/paragraph-placeholder.tsx:54 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D14 · License Compliance · Banned license · ×1
  • Banned license: sidekiq — `sidekiq` 6.5.12 is published on rubygems.org under LGPL-3.0, which this policy bans, and it is in the RUNTIME closure of this repository's Bundler manifests — so it is installed by everything that installs this repository, not just by its test harness. Replace it, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) react/src/ducks/filePlacements.js:5 — react/src/ducks/filePlacements.js → react/src/ducks/files.js → react/src/ducks/filePlacements.js (one verified cycle inside a mutually-dependent group of 4 files)
Serious — 723 finding(s)
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file app/components/folio/nested_fields_component.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 app/components/folio/console/files/show/thumbnails/crop_edit_component.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 app/components/folio/uppy_component.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 react/src/containers/FileModal/FileModalFile/index.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 app/assets/javascripts/folio/input/tiptap.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 app/assets/javascripts/folio/console/atoms/previews/base.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 packs/ai/app/assets/javascripts/folio/ai/input.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 app/components/folio/console/form/footer_component.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 app/assets/javascripts/folio/console/redactor/_table.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 REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file app/assets/javascripts/folio/input/date_time.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 app/assets/javascripts/folio/input/autocomplete.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 react/src/ducks/notesFields.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 app/components/folio/player_component.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 app/components/folio/console/files/batch/bar_component.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 app/components/folio/console/private_attachments_fields_component.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 app/components/folio/file_list/file_component.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 app/assets/javascripts/folio/thumbnails.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 REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file app/components/folio/console/files/subtitle_form_component.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 packs/ai/app/components/folio/ai/console/text_suggestions_group_component.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 app/assets/javascripts/folio/s3_upload.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 app/components/folio/console/ui/ajax_input_component.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 react/src/containers/FileModal/index.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 app/components/folio/console/files/picker_component.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.
  • + 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×34
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 9 more in this group — see findings.md.
D6 · Cohesion (LCOM4) · Low cohesion · ×31
  • Low cohesion: File (LCOM4 27) app/models/folio/file.rb:3 — File's methods fall into 27 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 27 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: User (LCOM4 22) app/models/folio/user.rb:3 — User's methods fall into 22 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BaseController (LCOM4 21) REDACTED:5 — BaseController's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VideosController (LCOM4 15) app/controllers/folio/console/api/file/videos_controller.rb:3 — VideosController's methods fall into 15 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 15 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ImagesController (LCOM4 13) app/controllers/folio/console/api/file/images_controller.rb:3 — ImagesController's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ApplicationController (LCOM4 12) app/controllers/folio/application_controller.rb:3 — ApplicationController's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AudiosController (LCOM4 11) app/controllers/folio/console/api/file/audios_controller.rb:3 — AudiosController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DocumentsController (LCOM4 11) app/controllers/folio/console/api/file/documents_controller.rb:3 — DocumentsController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VideosController (LCOM4 11) app/controllers/folio/console/file/videos_controller.rb:3 — VideosController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: InvitationsController (LCOM4 11) app/controllers/folio/users/invitations_controller.rb:3 — InvitationsController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Base (LCOM4 11) app/models/folio/file_placement/base.rb:3 — Base's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AudiosController (LCOM4 10) app/controllers/folio/console/file/audios_controller.rb:3 — AudiosController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DocumentsController (LCOM4 10) app/controllers/folio/console/file/documents_controller.rb:3 — DocumentsController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ImagesController (LCOM4 10) app/controllers/folio/console/file/images_controller.rb:3 — ImagesController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RegistrationsController (LCOM4 10) app/controllers/folio/users/registrations_controller.rb:3 — RegistrationsController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Audio (LCOM4 9) app/models/folio/file/audio.rb:3 — Audio's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PreviewsCell (LCOM4 7) app/cells/folio/console/atoms/previews_cell.rb:3 — PreviewsCell's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UiController (LCOM4 6) REDACTED:3 — UiController's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Image (LCOM4 6) app/models/folio/file/image.rb:3 — Image's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: StateCell (LCOM4 5) app/cells/folio/console/state_cell.rb:3 — StateCell's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UrlPickerComponent (LCOM4 5) app/components/folio/console/links/modal/url_picker_component.rb:3 — UrlPickerComponent's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ImageComponent (LCOM4 5) app/components/folio/console/ui/image_component.rb:3 — ImageComponent's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UsersController (LCOM4 5) app/controllers/folio/console/users_controller.rb:3 — UsersController's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OmniauthCallbacksController (LCOM4 5) REDACTED:3 — OmniauthCallbacksController's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Node (LCOM4 5) app/models/folio/tiptap/node.rb:3 — Node's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • + 6 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×23
  • TodoComment test/test_helper_base.rb:126 — # TODO: Refactor to use stub, this vesion is not thread safe — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment test/test_helper_base.rb:162 — # TODO: remove ? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment test/dummy/app/controllers/dummy/ui_controller.rb:159 — # TODO: tag images with dark/light theme — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment test/dummy/app/components/dummy/ui/card_component.rb:88 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment config/initializers/dragonfly.rb:98 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/concerns/folio/translatable.rb:32 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/overrides/lib/acts_as_taggable_on/tag_override.rb:19 — # TODO: move to auctocomplete.select2 action? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/overrides/lib/acts_as_taggable_on/tag_override.rb:20 — # TODO: move to auctocomplete.select2 action? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/folio/ability.rb:59 — # TODO: should it be `can :do_anything, Folio::User, { auth_site: site, superadmin: false }`?` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/folio/media_source.rb:5 — # TODO: include Folio::FilesSharedAccrossSites if Rails.application.config.folio_shared_files_between_sites — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/folio/newsletter_subscription.rb:77 — # TODO: multiple mailchimp lists not implemented yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/folio/atom/base.rb:348 — # TODO associations and attachments — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/concerns/folio/imprintable.rb:7 — # TODO: imprint methods & attributes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/concerns/folio/imprintable.rb:8 — # TODO: white-list attributes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/concerns/folio/imprintable.rb:9 — # TODO: multi-level associations — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/models/concerns/folio/media_file_processing_base.rb:14 — # TODO: split to submodules with & without preview — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/lib/folio/tiptap/node_builder.rb:160 — # TODO validate rich_text JSON structure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/jobs/folio/generate_thumbnail_job.rb:115 — # TODO frame — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:205 — # TODO: implement stuff if needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:209 — # TODO: implement stuff if needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/components/folio/file_list/file_component.rb:67 — # TODO handle private/session attachments — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/components/folio/console/ui/button_component.rb:56 — # TODO dropzone — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/cells/folio/console/catalogue_cell.rb:341 — # TODO: restrict - only for can_now?(:update, record) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×23
  • Swallowed exception (caught, then discarded) app/services/folio/metadata/iptc_field_mapper.rb:896 — `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/services/folio/metadata/iptc_field_mapper.rb:943 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/services/folio/metadata/iptc_field_mapper.rb:944 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/services/folio/metadata/iptc_field_mapper.rb:946 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/serializers/folio/console/file_placement_serializer.rb:26 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/serializers/folio/console/file_placement_serializer.rb:42 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/models/folio/help_document.rb:93 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/models/concerns/folio/has_attachments.rb:103 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/models/concerns/folio/atom/method_missing.rb:128 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/models/concerns/folio/atom/method_missing.rb:174 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/lib/folio/embed.rb:70 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/lib/folio/tiptap/content.rb:99 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/lib/folio/tiptap/content.rb:108 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/lib/folio/tiptap/node_builder.rb:166 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/lib/folio/tiptap/node_builder.rb:186 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/controllers/folio/console/api/links_controller.rb:9 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/controllers/folio/console/api/links_controller.rb:29 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/controllers/folio/console/api/links_controller.rb:57 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/controllers/concerns/folio/console/api/file_controller_base.rb:417 — `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/components/folio/console/files/show/file_placements_component.rb:73 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/components/folio/console/files/show/metadata_component.rb:34 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/components/folio/console/files/show/thumbnails/ratio/thumbnail_component.rb:18 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/cells/folio/console/index/position_buttons/_regular.js:182 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×16
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:45 — `.tiptap-popover[data-state="open"]` moves (`animation: fadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomIn 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:51 — `.tiptap-popover[data-state="closed"]` moves (`animation: fadeOut 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomOut 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:60 — `.tiptap-popover[data-side="top"]` moves (`animation: slideFromBottom 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:66 — `.tiptap-popover[data-side="right"]` moves (`animation: slideFromLeft 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:72 — `.tiptap-popover[data-side="bottom"]` moves (`animation: slideFromTop 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:78 — `.tiptap-popover[data-side="left"]` moves (`animation: slideFromRight 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:55 — `.tiptap-dropdown-menu[data-state="open"]` moves (`animation: fadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomIn 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:61 — `.tiptap-dropdown-menu[data-state="closed"]` moves (`animation: fadeOut 150ms cubic-bezier(0.16, 1, 0.3, 1), zoomOut 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:70 — `.tiptap-dropdown-menu[data-side="top"]` moves (`animation: slideFromBottom 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:76 — `.tiptap-dropdown-menu[data-side="right"]` moves (`animation: slideFromLeft 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:82 — `.tiptap-dropdown-menu[data-side="bottom"]` moves (`animation: slideFromTop 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:88 — `.tiptap-dropdown-menu[data-side="left"]` moves (`animation: slideFromRight 150ms cubic-bezier(0.16, 1, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.scss:8 — `.tiptap-button-highlight` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard data/embed/source/embed.css:77 — `.f-embed__loader:before` moves (`animation: load8 1.1s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard app/assets/stylesheets/folio/console/_help_documents.scss:3 — `.folio-console-help-documents-index .card` moves (`transition: transform 0.2s ease, box-shadow 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard app/assets/javascripts/folio/console/react.css:2 — `.rst__highlightLineVertical:after` moves (`animation: arrow-pulse 1s linear infinite both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
X3 · Exception handling · Swallowed exception (empty catch) · ×16
  • Swallowed exception (empty catch) react/src/ducks/files.js:201 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/folio/engine.rb:469 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/models/folio/file.rb:400 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/models/concerns/folio/atom/method_missing.rb:185 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:131 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/components/folio/application_component.rb:106 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:52 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/cookie_consent_cell.rb:160 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/cookie_consent_cell.rb:266 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/ui_cell.rb:88 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/console/report_cell.rb:52 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/console/report_cell.rb:59 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/console/index/actions_cell.rb:43 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/cells/folio/console/console_notes/catalogue_tooltip/catalogue_tooltip.js:59 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/assets/javascripts/folio/input/phone.js:65 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/assets/javascripts/folio/input/url.js:146 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
AC4 · Keyboard semantics · Anchor without href · ×15
  • Anchor without href app/cells/folio/console/atoms/previews/_inner_insert.slim:21 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/console/catalogue_sort_arrows/show.slim:1 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/console/merges/form/show.slim:37 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/console/merges/index/footer/show.slim:3 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/console/private_attachments/single_dropzone/show.slim:4 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/console/searches/results/show.slim:8 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/cells/folio/devise/omniauth_conflict/show.slim:10 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/files/show/file_placements_component.slim:85 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/files/show/preview_component.slim:4 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/files/show/thumbnails/ratio/thumbnail_component.slim:9 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/files/show_component.slim:52 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/layout/header_component.slim:40 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/layout/header_component.slim:51 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/components/folio/console/links/value_component.slim:15 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href app/views/folio/console/partials/_tabs.slim:6 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D3 · God Classes · TooManyMethods · ×12
  • TooManyMethods: FormSnapshotSanitizer packs/ai/app/lib/folio/ai/form_snapshot_sanitizer.rb:6 — 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: File app/models/folio/file.rb:3 — 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: SiteSettingsComponent packs/ai/app/components/folio/ai/console/site_settings_component.rb:4 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: CatalogueCell app/cells/folio/console/catalogue_cell.rb:3 — 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: TextSuggestionRequest REDACTED:6 — 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: BaseController REDACTED:5 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: SidebarCell app/cells/folio/console/layout/sidebar_cell.rb:5 — 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: Base app/models/folio/atom/base.rb:3 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: User app/models/folio/user.rb:3 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Site app/models/folio/site.rb:3 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CropEditComponent app/components/folio/console/files/show/thumbnails/crop_edit_component.rb:3 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: FileControllerBase app/controllers/concerns/folio/console/api/file_controller_base.rb:6 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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.
D3 · God Classes · FunctionTooLong · ×11
  • FunctionTooLong: atoms.atomsReducer react/src/ducks/atoms.js:484 — FunctionTooLong — atomsReducer runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.default react/src/containers/FileModal/FileModalFile/index.js:27 — FunctionTooLong — default runs 408 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 308 over it, 4.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.
  • FunctionTooLong: input.registerAiInputController packs/ai/app/assets/javascripts/folio/ai/input.js:27 — FunctionTooLong — registerAiInputController runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: text_suggestions_group_component.registerTextSuggestionsGroupController packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js:2 — FunctionTooLong — registerTextSuggestionsGroupController runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.default react/src/components/ReadOnlyMetadataDisplay/index.js:3 — FunctionTooLong — default runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× 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: thumbnails.initThumbnails app/assets/javascripts/folio/thumbnails.js:2 — FunctionTooLong — initThumbnails runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: s3_upload.Folio.S3Upload.createDropzone app/assets/javascripts/folio/s3_upload.js:43 — FunctionTooLong — Folio.S3Upload.createDropzone runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× 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: files.filesReducer react/src/ducks/files.js:325 — FunctionTooLong — filesReducer runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.FolioConsole.React.init react/src/index.js:31 — FunctionTooLong — FolioConsole.React.init runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: fileModal.modalReducer react/src/ducks/fileModal.js:263 — FunctionTooLong — modalReducer runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: notesFields.notesFieldsReducer react/src/ducks/notesFields.js:186 — FunctionTooLong — notesFieldsReducer runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×10
  • Focus outline removed in CSS without a :focus replacement tiptap/src/styles/index.scss:291 — `.tiptap.ProseMirror` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-ui-primitive/popover/popover.scss:29 — `.tiptap-popover` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss:31 — `.tiptap-dropdown-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-ui-primitive/button/button.scss:33 — `.tiptap-button:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-ui/link-popover/link-popover.scss:16 — `.f-tiptap-link-popover__input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.scss:5 — `.tiptap-color-highlight-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement tiptap/src/components/tiptap-extensions/folio-tiptap-commands/folio-tiptap-commands-list.scss:93 — `.f-tiptap-commands-list__item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement app/assets/javascripts/folio/console/react.css:2 — `.rst__rowCancelPad` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement app/assets/javascripts/folio/console/react.css:2 — `.rst__placeholderCancelPad` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement app/assets/javascripts/folio/console/react.css:2 — `.ReactVirtualized__Grid` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×7
  • Change coupling: simple_form_wrap_component.js ↔ simple_form_wrap_component.rb app/components/folio/console/tiptap/simple_form_wrap_component.js:1 — `app/components/folio/console/tiptap/simple_form_wrap_component.js` and `app/components/folio/console/tiptap/simple_form_wrap_component.rb` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `b69cc887` feat(tiptap): add console tabs for non-locale multiple tiptap attributes; `c550ca48` feat(tiptap): persist locale selection for new records; `8358baef` feat(tiptap): persist selected attribute in cookie per record — run `git show` on any of them.
  • Change coupling: picker_component.js ↔ picker_component.rb app/components/folio/console/files/picker_component.js:1 — `app/components/folio/console/files/picker_component.js` and `app/components/folio/console/files/picker_component.rb` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 8 shared commits counted here, the most recent 3 are `4d2bc3c8` feat(files): add file_name to files/picker; `f2020cb2` fix(files): only use message bus to handle hiding destroyed; `65814fd6` feat(files): handle file deletion in pickers — run `git show` on any of them.
  • Change coupling: REDACTED ↔ REDACTED react/src/containers/IndexMode/index.js:1 — `react/src/containers/IndexMode/index.js` and `react/src/containers/SingleSelect/index.js` change together 72% of the time (21 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `6af19bc9` refactor(react): replace react-lazyload with loading="lazy" in react …; `ff123805` pass human type to s3-upload js, reduce max file size for images; `d55ce90f` add option to disable file tagging to react — run `git show` on any of them.
  • Change coupling: file_component.js ↔ file_list_component.rb app/components/folio/file_list/file_component.js:1 — `app/components/folio/file_list/file_component.js` and `app/components/folio/file_list_component.rb` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `03aef47e` fix(console/files): confirm batch save while uploads in flight; `86b0ce53` feat(files): implement Folio::File/created_manually message for file …; `99e630a8` feat(files): allow direct selection in multi picker — run `git show` on any of them.
  • Change coupling: file_list_component.js ↔ file_list_component.rb app/components/folio/file_list_component.js:1 — `app/components/folio/file_list_component.js` and `app/components/folio/file_list_component.rb` change together 54% of the time (7 of the 13 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 7 shared commits counted here, the most recent 3 are `03aef47e` fix(console/files): confirm batch save while uploads in flight; `ca0ef407` File form refreshing fix (#586); `86b0ce53` feat(files): implement Folio::File/created_manually message for file … — run `git show` on any of them.
  • Change coupling: tiptap.js ↔ tiptap_input.rb app/assets/javascripts/folio/input/tiptap.js:1 — `app/assets/javascripts/folio/input/tiptap.js` and `app/inputs/tiptap_input.rb` change together 53% of the time (16 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `01872ef2` feat(tiptap): start block editor in responsive preview from user pref…; `468bb3dd` feat(tiptap_revisions): add attribute_name support for locale-specifi…; `eeb3efd3` fix/tiptap autosave final touches (#421) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ app.js react/src/containers/FilesApp/index.js:1 — `react/src/containers/FilesApp/index.js` and `react/src/ducks/app.js` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `bdd3df6d` Petr/photoarchive (#394); `d55ce90f` add option to disable file tagging to react; `8324aba5` make react respect cannot :destroy files — run `git show` on any of them.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×7
  • Duplicated block (15 lines × 2 locations) app/assets/javascripts/folio/console/redactor/_table.js:402 — app/assets/javascripts/folio/console/redactor/_table.js:402 · app/assets/javascripts/folio/console/redactor/_video.js:147 — 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 (15 lines × 2 locations) app/components/folio/console/files/picker/document_component.js:5 — app/components/folio/console/files/picker/document_component.js:5 · app/components/folio/console/files/picker/image_component.js:3 — 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 (15 lines × 2 locations) react/src/containers/FileModal/FileModalFile/index.js:319 — react/src/containers/FileModal/FileModalFile/index.js:319 · react/src/containers/FileModal/FileModalFile/index.js:335 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (15 lines × 2 locations) react/src/containers/IndexMode/index.js:56 — react/src/containers/IndexMode/index.js:56 · react/src/containers/SingleSelect/index.js:49 — 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 (15 lines × 2 locations) react/src/ducks/atoms.js:745 — react/src/ducks/atoms.js:745 · react/src/ducks/atoms.js:811 — 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) react/src/ducks/files.js:318 — react/src/ducks/files.js:318 · react/src/ducks/uploads.js:98 — 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 (15 lines × 2 locations) react/src/index.js:60 — react/src/index.js:60 · react/src/index.js:81 — 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.
AC3 · Page structure · Page without a main landmark · ×6
  • Page without a main landmark app/views/layouts/folio/console/application.slim:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark app/views/layouts/folio/console/devise.slim:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark data/embed/source/embed.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <span>, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark lib/generators/folio/assets/templates/public/maintenance.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark react/public/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark tiptap/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="folio-tiptap-dev-root">, so there is no content here to wrap — render the <main> from the component mounted into it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · FixmeComment · ×5
  • FixmeComment lib/folio/sitemap_generator.rb:41 — # FIXME: sitemap generator doesn't support session tokens — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment app/models/concerns/folio/imprintable.rb:20 — # FIXME: fix this for nested hash — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment app/models/concerns/folio/imprintable.rb:83 — # FIXME: `files` association is broken — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment app/controllers/concerns/folio/captcha/has_recaptcha_validation.rb:10 — # FIXME: just a quick fix,this should be implemented differently, invalid recaptcha should render model with error — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment app/cells/folio/console/addresses/fields_cell.rb:20 — # FIXME: address doesn't know it's placement at this moment, can't change validation according to the placement class — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×5
  • Edited copy of a member (11 corresponding lines) app/components/folio/console/ui/index/filters_component.rb:209 — app/components/folio/console/ui/index/filters_component.rb:209-220 | app/components/folio/console/ui/index/filters_component.rb:224-234 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/controllers/folio/console/api/file/videos_controller.rb:31 — app/controllers/folio/console/api/file/videos_controller.rb:31-46 | app/controllers/folio/console/api/file/videos_controller.rb:50-60 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:22 — REDACTED:22-35 | app/models/concerns/folio/has_secret_hash.rb:15-25 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/components/folio/application_component.rb:59 — app/components/folio/application_component.rb:59-69 | app/lib/folio/application_cell.rb:42-52 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) db/migrate/20190418055819_devise_invitable_add_to_folio_accounts.rb:5 — db/migrate/20190418055819_devise_invitable_add_to_folio_accounts.rb:5-16 | db/migrate/20210208140011_devise_invitable_add_to_folio_users.rb:5-15 — 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 · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) app/jobs/folio/cra_media_cloud/check_progress_job.rb:253 — app/jobs/folio/cra_media_cloud/check_progress_job.rb:253-265 | app/jobs/folio/cra_media_cloud/check_progress_job.rb:405-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/jobs/folio/cra_media_cloud/check_progress_job.rb:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) app/jobs/folio/generate_missing_thumb_webp_job.rb:40 — app/jobs/folio/generate_missing_thumb_webp_job.rb:40-50 | app/jobs/folio/regenerate_thumb_webp_job.rb:40-50 — before extracting anything, compare `app/jobs/folio/generate_missing_thumb_webp_job.rb` and `app/jobs/folio/regenerate_thumb_webp_job.rb` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 × 2) app/overrides/lib/simple_form/inputs/string_input_override.rb:50 — app/overrides/lib/simple_form/inputs/string_input_override.rb:50-60 | app/overrides/lib/simple_form/inputs/text_input_override.rb:20-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/overrides/lib/simple_form/inputs/text_input_override.rb:18` calls `add_text_suggestions` and `app/overrides/lib/simple_form/inputs/string_input_override.rb:48` 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 lines × 2) app/inputs/advanced_redactor_input.rb:5 — app/inputs/advanced_redactor_input.rb:5-15 | app/inputs/email_redactor_input.rb:5-15 — 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 (11 lines × 2) app/cells/folio/devise/invitations/new_cell.rb:5 — app/cells/folio/devise/invitations/new_cell.rb:5-15 | app/cells/folio/devise/sessions/new_cell.rb:7-17 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience REDACTED:23 — `Net::HTTP.post_form` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience app/controllers/folio/console/api/jw_player_controller.rb:9 — `HTTParty.get` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience app/lib/folio/ares.rb:32 — `HTTParty.get` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:43 — `Net::HTTP.start` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience app/lib/folio/jw_player/api.rb:122 — `Net::HTTP.new` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D17 · Explicit Debt · HackComment · ×4
  • HackComment test/models/folio/ability_test.rb:227 — # hack to remove creating newsletter_subscription after user creation — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment test/models/concerns/folio/has_site_roles_test.rb:21 — # hack to allow 2 sites after Folio::Site class initialization — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment test/controllers/folio/console/users_controller_test.rb:19 — # hack around ability to :set_author — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment test/controllers/folio/console/users_controller_test.rb:153 — # hack around ability to :set_author — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: ducks/atoms.js react/src/ducks/atoms.js — FileTooLong — 717 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 217 over it, 1.43× 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: metadata/iptc_field_mapper.rb app/services/folio/metadata/iptc_field_mapper.rb — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: console/catalogue_cell.rb app/cells/folio/console/catalogue_cell.rb — FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4 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.
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: file_component.rb → show_modal_component.js, file_component.js, file_list_component.rb app/components/folio/file_list/file_component.rb — `app/components/folio/file_list/file_component.rb` changes together with 3 other files — `app/components/folio/console/files/show_modal_component.js`, `app/components/folio/file_list/file_component.js`, `app/components/folio/file_list_component.rb` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: react_helper.rb → REDACTED, orderedMultiselect.js, REDACTED app/helpers/folio/console/react_helper.rb — `app/helpers/folio/console/react_helper.rb` changes together with 3 other files — `react/src/containers/OrderedMultiselectApp/index.js`, `react/src/ducks/orderedMultiselect.js`, `react/src/index.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: REDACTED → REDACTED, REDACTED, REDACTED react/src/components/MultiSelectComponent/index.js — `react/src/components/MultiSelectComponent/index.js` changes together with 3 other files — `react/src/containers/FilesApp/index.js`, `react/src/containers/IndexMode/index.js`, `react/src/containers/SingleSelect/index.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×3
  • Duplicated block (9 lines × 2) lib/generators/folio/ui/ui_generator.rb:57 — lib/generators/folio/ui/ui_generator.rb:57-66 | lib/generators/folio/ui/ui_generator.rb:70-78 — 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) app/components/folio/console/files/picker/document_component.rb:5 — app/components/folio/console/files/picker/document_component.rb:5-13 | app/components/folio/console/files/picker/image_component.rb:5-13 — 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 (9 lines × 2) app/cells/folio/image_cell.rb:328 — app/cells/folio/image_cell.rb:328-336 | app/components/folio/console/ui/image_component.rb:317-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) REDACTED:315 — REDACTED:315-321 | REDACTED:323-329 — 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) app/cells/folio/devise/passwords/edit_cell.rb:5 — app/cells/folio/devise/passwords/edit_cell.rb:5-11 | app/cells/folio/devise/passwords/new_cell.rb:5-11 — 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) app/jobs/folio/jw_player/check_progress_job.rb:14 — app/jobs/folio/jw_player/check_progress_job.rb:14-20 | app/jobs/folio/mux/check_progress_job.rb:14-20 — 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.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×3
  • Duplicated block (12 lines × 2 locations) app/assets/javascripts/folio/console/redactor/_table.js:296 — app/assets/javascripts/folio/console/redactor/_table.js:296 · app/assets/javascripts/folio/console/redactor/_table.js:328 — 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) app/components/folio/console/files/show_component.js:156 — app/components/folio/console/files/show_component.js:156 · app/components/folio/console/files/show_component.js:171 — 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) react/src/containers/FileFilter/index.js:70 — react/src/containers/FileFilter/index.js:70 · react/src/containers/FileFilter/index.js:90 — 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.
R11 · Import Boundaries · Boundary violation [package · ×3
  • Boundary violation [package:relative-cross-package] react/src/folioTestSetup.js:2 — react/src/folioTestSetup.js:2 reaches into another package with a relative path (../../app/assets/javascripts/folio/message_bus) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] react/src/folioTestSetup.js:4 — react/src/folioTestSetup.js:4 reaches into another package with a relative path (../../app/assets/javascripts/folio/api) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] react/src/folioTestSetup.js:5 — react/src/folioTestSetup.js:5 reaches into another package with a relative path (../../app/components/folio/console/ui/flash_component) — import the package by name instead.
D15 · Churn × Complexity Hotspots · Hotspot · ×2
  • Hotspot: react/src/components/AtomForm/index.js react/src/components/AtomForm/index.js:163 — react/src/components/AtomForm/index.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in AtomForm.render at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 13:12:25 +01:00' --until='2026-11-05 13:12:25 +01:00' --full-history --no-merges -- react/src/components/AtomForm/index.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/components/folio/uppy_component.js app/components/folio/uppy_component.js:68 — app/components/folio/uppy_component.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in init at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 13:12:25 +01:00' --until='2026-11-05 13:12:25 +01:00' --full-history --no-merges -- app/components/folio/uppy_component.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · buildPayload (cognitive 18) · ×2
  • buildPayload (cognitive 18) REDACTED:321 — buildPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • buildPayload (cognitive 18) app/components/folio/console/files/subtitle_form_component.js:242 — buildPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×2
  • MethodTooLong: AtomForm.render react/src/components/AtomForm/index.js:163 — MethodTooLong — render runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.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.
  • MethodTooLong: Select.render react/src/components/Select/index.js:86 — MethodTooLong — render runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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.
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: document.rb, image.rb, video.rb app/models/folio/file/document.rb — 3 files — `app/models/folio/file/document.rb`, `app/models/folio/file/image.rb`, `app/models/folio/file/video.rb` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: ajax_input_component.js, ajax_input_component.rb, in_place_input_component.js, in_place_input_component.rb app/components/folio/console/ui/ajax_input_component.js — 4 files — `app/components/folio/console/ui/ajax_input_component.js`, `app/components/folio/console/ui/ajax_input_component.rb`, `app/components/folio/console/ui/in_place_input_component.js`, `app/components/folio/console/ui/in_place_input_component.rb` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) app/jobs/folio/cra_media_cloud/check_progress_job.rb:245 — app/jobs/folio/cra_media_cloud/check_progress_job.rb:245-279 | app/jobs/folio/cra_media_cloud/check_progress_job.rb:400-420 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) app/models/folio/file_placement/base.rb:174 — app/models/folio/file_placement/base.rb:174-195 | app/models/folio/file_placement/base.rb:205-225 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) app/controllers/concerns/folio/console/api/file_controller_base.rb:174 — app/controllers/concerns/folio/console/api/file_controller_base.rb:174-193 | app/controllers/concerns/folio/console/api/file_controller_base.rb:197-212 — 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) app/components/folio/tiptap/content/prose_mirror_node_component.rb:140 — app/components/folio/tiptap/content/prose_mirror_node_component.rb:140-155 | app/components/folio/tiptap/content/prose_mirror_node_component.rb:171-186 — 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 (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) app/overrides/lib/simple_form/inputs/color_input_override.rb:3 — app/overrides/lib/simple_form/inputs/color_input_override.rb:3-19 | app/overrides/lib/simple_form/inputs/hidden_input_override.rb:3-17 — 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) app/models/concerns/folio/has_ancestry_slug.rb:42 — app/models/concerns/folio/has_ancestry_slug.rb:42-56 | app/models/concerns/folio/has_ancestry_slug_for_traco.rb:51-68 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) app/controllers/concerns/folio/captcha/has_recaptcha_validation.rb:15 — app/controllers/concerns/folio/captcha/has_recaptcha_validation.rb:15-20 | REDACTED:36-41 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) lib/generators/folio/assets/assets_generator.rb:54 — lib/generators/folio/assets/assets_generator.rb:54-59 | lib/generators/folio/install_generator.rb:64-72 — 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 (3 corresponding lines) · ×2
  • Edited copy of a member (3 corresponding lines) REDACTED:25 — REDACTED:25-27 | app/cells/folio/console/addresses/fields_cell.rb:36-38 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) app/controllers/folio/console/api/file/videos_controller.rb:155 — app/controllers/folio/console/api/file/videos_controller.rb:155-157 | app/jobs/folio/application_job.rb:17-19 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) lib/generators/folio/generator_base.rb:110 — lib/generators/folio/generator_base.rb:110-122 | lib/generators/folio/page_singleton/page_singleton_generator.rb:38-50 — 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 (13 lines × 2) lib/generators/folio/generator_base.rb:125 — lib/generators/folio/generator_base.rb:125-137 | lib/generators/folio/page_singleton/page_singleton_generator.rb:48-60 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) REDACTED:375 — REDACTED:375-384 | REDACTED:391-400 — 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) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:256 — app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:256-265 | REDACTED:116-125 — `app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) app/controllers/concerns/folio/console/api/file_controller_base.rb:451 — app/controllers/concerns/folio/console/api/file_controller_base.rb:451-455 | app/controllers/concerns/folio/console/file_controller_base.rb:182-186 — 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 (5 lines × 2) app/cells/folio/cookie_consent_cell.rb:247 — app/cells/folio/cookie_consent_cell.rb:247-251 | app/cells/folio/cookie_consent_cell.rb:257-261 — 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 `app/cells/folio/cookie_consent_cell.rb:247` 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.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×2
  • Duplicated block (21 lines × 2 locations) react/src/components/AtomForm/MultiAttachmentsSelect.js:81 — react/src/components/AtomForm/MultiAttachmentsSelect.js:81 · react/src/containers/MultiSelect/index.js:55 — 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 (21 lines × 2 locations) react/src/ducks/atoms.js:526 — react/src/ducks/atoms.js:526 · react/src/ducks/atoms.js:856 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×2
  • Duplicated block (17 lines × 2 locations) react/src/components/DateInput/index.js:6 — react/src/components/DateInput/index.js:6 · react/src/containers/NotesFieldsApp/Table/DueDate/index.js:5 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (17 lines × 2 locations) react/src/components/Select/index.js:267 — react/src/components/Select/index.js:267 · react/src/components/Select/index.js:285 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×2
  • Duplicated block (16 lines × 2 locations) app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:18 — app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:18 · app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js:35 — 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 (16 lines × 2 locations) app/components/folio/embed/box_component.js:133 — app/components/folio/embed/box_component.js:133 · data/embed/source/embed.js:4 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×2
  • Duplicated block (13 lines × 2 locations) app/assets/javascripts/folio/input/collection_filterable.js:16 — app/assets/javascripts/folio/input/collection_filterable.js:16 · app/assets/javascripts/folio/input/collection_remote_select.js:135 — 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 (13 lines × 2 locations) react/src/components/FolioConsoleUiButton/index.js:54 — react/src/components/FolioConsoleUiButton/index.js:54 · react/src/components/FolioConsoleUiButton/index.js:73 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×2
  • Duplicated block (11 lines × 2 locations) app/assets/javascripts/folio/console/atoms/previews/base.js:357 — app/assets/javascripts/folio/console/atoms/previews/base.js:357 · app/assets/javascripts/folio/console/atoms/previews/base.js:369 — 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) app/assets/javascripts/folio/console/redactor/_table.js:263 — app/assets/javascripts/folio/console/redactor/_table.js:263 · app/assets/javascripts/folio/console/redactor/_video.js:119 — 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 (11 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (11 matched lines × 2 locations) app/assets/javascripts/folio/thumbnails.js:19 — app/assets/javascripts/folio/thumbnails.js:19 · app/assets/javascripts/folio/thumbnails.js:57 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (11 matched lines × 2 locations) app/components/folio/console/ui/ajax_input_component.js:52 — app/components/folio/console/ui/ajax_input_component.js:52 · app/components/folio/console/ui/ajax_input_component.js:91 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R7 · Dead Code · Dead file (~304 LoC) · ×2
  • Dead file (~304 LoC) app/components/folio/console/files/subtitle_form_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~304 LoC) packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~188 LoC) · ×2
  • Dead file (~188 LoC) app/components/folio/console/file_placements/multi_picker_fields_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~188 LoC) app/components/folio/embed/box_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~120 LoC) · ×2
  • Dead file (~120 LoC) app/components/folio/file_list_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~120 LoC) packs/ai/app/components/folio/ai/console/text_suggestions_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~104 LoC) · ×2
  • Dead file (~104 LoC) app/components/folio/console/ui/in_place_input_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~104 LoC) app/components/folio/file_list/file/batch_checkbox_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
S1 · Web-Security Posture · Weak hash algorithm · ×2
  • Weak hash algorithm REDACTED:92 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:67 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC2 · Forms & labels · <fieldset> without a <legend> · ×1
  • <fieldset> without a <legend> app/components/folio/console/tiptap/overlay/form/nested_nodes_component.slim:1 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 app/components/folio/console/files/subtitles_form_component.slim:47 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Empty <h2> heading · ×1
  • Empty <h2> heading tiptap/src/components/tiptap-extensions/folio-tiptap-pages/folio-tiptap-page-view.tsx:136 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
C1 · Data Protection · No data-protection/encryption · ×1
  • No data-protection/encryption db/migrate/20170710125730_create_folio_sites.rb:8 — No encryption usage (Active Record Encryption's encrypts, lockbox, attr_encrypted, vault-rails, ActiveSupport::MessageEncryptor, OpenSSL::Cipher, RbNaCl) was found, and this repository persists personal data in the model cited here — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.
D1 · Cyclomatic Complexity · index.default (cyclomatic 80) · ×1
  • index.default (cyclomatic 80) react/src/containers/FileModal/FileModalFile/index.js:27 — index.default has cyclomatic complexity 80 (threshold 15). Of this number, 75 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Select.render (cyclomatic 74) · ×1
  • Select.render (cyclomatic 74) react/src/components/Select/index.js:86 — Select.render has cyclomatic complexity 74 (threshold 15). Of this number, 35 points are the body's own statements and 39 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · atoms.atomsReducer (cyclomatic 61) · ×1
  • atoms.atomsReducer (cyclomatic 61) react/src/ducks/atoms.js:484 — atoms.atomsReducer has cyclomatic complexity 61 (threshold 15). Of this number, 31 points are the body's own statements and 30 belong to 18 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · input.registerAiInputController (cyclomatic 55) · ×1
  • input.registerAiInputController (cyclomatic 55) packs/ai/app/assets/javascripts/folio/ai/input.js:27 — input.registerAiInputController has cyclomatic complexity 55 (threshold 15). Of this number, 54 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.default (cyclomatic 55) · ×1
  • index.default (cyclomatic 55) react/src/components/ReadOnlyMetadataDisplay/index.js:3 — index.default has cyclomatic complexity 55 (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. This shape REPEATS in the file: one other method here (index.default::renderMetadataRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 55) · ×1
  • (anonymous) (cyclomatic 55) react/src/components/ReadOnlyMetadataDisplay/index.js:3 — (anonymous) has cyclomatic complexity 55 (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.
D1 · Cyclomatic Complexity · GenerateThumbnailJob.make_thumb (cyclomatic 53) · ×1
  • GenerateThumbnailJob.make_thumb (cyclomatic 53) app/jobs/folio/generate_thumbnail_job.rb:74 — GenerateThumbnailJob.make_thumb has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · initThumbnails (cyclomatic 52) · ×1
  • initThumbnails (cyclomatic 52) app/assets/javascripts/folio/thumbnails.js:2 — initThumbnails has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 3 of the 52 points are its own statements and the rest belongs to 27 function items inside it that branch (updateImageSources, a function literal at line 279, dataFromString, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · consolePreviewTemplate (cyclomatic 52) · ×1
  • consolePreviewTemplate (cyclomatic 52) app/assets/javascripts/folio/s3_upload.js:33 — consolePreviewTemplate has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to 26 function items inside it that branch (a function literal at line 219, createDropzone::error, createDropzone, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · s3_upload.Folio.S3Upload.createDropzone (cyclomatic 50) · ×1
  • s3_upload.Folio.S3Upload.createDropzone (cyclomatic 50) app/assets/javascripts/folio/s3_upload.js:43 — s3_upload.Folio.S3Upload.createDropzone has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 12 of the 50 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 219, 114, 165, …). 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.
D1 · Cyclomatic Complexity · AutocompletesController.react_select (cyclomatic 40) · ×1
  • AutocompletesController.react_select (cyclomatic 40) app/controllers/folio/console/api/autocompletes_controller.rb:257 — AutocompletesController.react_select has cyclomatic complexity 40 (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.
D1 · Cyclomatic Complexity · fileModal.modalReducer (cyclomatic 40) · ×1
  • fileModal.modalReducer (cyclomatic 40) react/src/ducks/fileModal.js:263 — fileModal.modalReducer has cyclomatic complexity 40 (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.
D1 · Cyclomatic Complexity · AtomForm.render (cyclomatic 38) · ×1
  • AtomForm.render (cyclomatic 38) react/src/components/AtomForm/index.js:163 — AtomForm.render has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 245, 249, 182, …). 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.
D1 · Cyclomatic Complexity · ListComponent.records_data (cyclomatic 37) · ×1
  • ListComponent.records_data (cyclomatic 37) REDACTED:14 — ListComponent.records_data has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · render · ×1
  • render::loadOptions (cyclomatic 37) react/src/components/Select/index.js:172 — render::loadOptions has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MethodMissing.method_missing_data (cyclomatic 34) · ×1
  • MethodMissing.method_missing_data (cyclomatic 34) app/models/concerns/folio/atom/method_missing.rb:102 — MethodMissing.method_missing_data has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImageComponent.set_data (cyclomatic 33) · ×1
  • ImageComponent.set_data (cyclomatic 33) app/components/folio/console/ui/image_component.rb:54 — ImageComponent.set_data has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 29) · ×1
  • (anonymous) (cyclomatic 29) react/src/containers/FileModal/FileModalFile/index.js:27 — (anonymous) has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NodeBuilder.setup_structure_for_folio_attachment (cyclomatic 28) · ×1
  • NodeBuilder.setup_structure_for_folio_attachment (cyclomatic 28) app/lib/folio/tiptap/node_builder.rb:279 — NodeBuilder.setup_structure_for_folio_attachment has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AtomInput.AtomInput (cyclomatic 28) · ×1
  • AtomInput.AtomInput (cyclomatic 28) react/src/components/AtomForm/AtomInput.js:37 — AtomInput.AtomInput has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · files.filesReducer (cyclomatic 28) · ×1
  • files.filesReducer (cyclomatic 28) react/src/ducks/files.js:325 — files.filesReducer has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SidebarCell.link_from (cyclomatic 27) · ×1
  • SidebarCell.link_from (cyclomatic 27) app/cells/folio/console/layout/sidebar_cell.rb:66 — SidebarCell.link_from has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · text_suggestions_group_component.registerTextSuggestionsGroupController (cyclomatic 27) · ×1
  • text_suggestions_group_component.registerTextSuggestionsGroupController (cyclomatic 27) packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js:2 — text_suggestions_group_component.registerTextSuggestionsGroupController has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Headers.set_cache_control_headers (cyclomatic 24) · ×1
  • Headers.set_cache_control_headers (cyclomatic 24) app/controllers/concerns/folio/http_cache/headers.rb:12 — Headers.set_cache_control_headers 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.
D1 · Cyclomatic Complexity · startAutoScroll · ×1
  • startAutoScroll::performAutoScroll (cyclomatic 24) app/components/folio/nested_fields_component.js:532 — startAutoScroll::performAutoScroll 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.
D1 · Cyclomatic Complexity · init (cyclomatic 23) · ×1
  • init (cyclomatic 23) app/components/folio/uppy_component.js:68 — init has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 23 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.PaginationComponent (cyclomatic 22) · ×1
  • index.PaginationComponent (cyclomatic 22) REDACTED:24 — index.PaginationComponent has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · asyncJobRequest (cyclomatic 22) · ×1
  • asyncJobRequest (cyclomatic 22) packs/ai/app/assets/javascripts/folio/ai/request.js:5 — asyncJobRequest has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 18 function items inside it that branch (receiveMessage, a function literal at line 38, a function literal at line 28, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ButtonComponent.tag (cyclomatic 21) · ×1
  • ButtonComponent.tag (cyclomatic 21) app/components/folio/console/ui/button_component.rb:63 — ButtonComponent.tag has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AutocompletesController.show (cyclomatic 21) · ×1
  • AutocompletesController.show (cyclomatic 21) app/controllers/folio/console/api/autocompletes_controller.rb:7 — AutocompletesController.show has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AutocompletesController.select2 (cyclomatic 21) · ×1
  • AutocompletesController.select2 (cyclomatic 21) app/controllers/folio/console/api/autocompletes_controller.rb:187 — AutocompletesController.select2 has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReactHelper.react_ordered_multiselect (cyclomatic 21) · ×1
  • ReactHelper.react_ordered_multiselect (cyclomatic 21) app/helpers/folio/console/react_helper.rb:139 — ReactHelper.react_ordered_multiselect has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · embed.createEmbedElement (cyclomatic 21) · ×1
  • embed.createEmbedElement (cyclomatic 21) data/embed/source/embed.js:98 — embed.createEmbedElement has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.FileTableRow (cyclomatic 21) · ×1
  • index.FileTableRow (cyclomatic 21) react/src/components/FileList/FileTableList/FileTableRow/index.js:11 — index.FileTableRow 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.
D1 · Cyclomatic Complexity · index.FolioConsole.React.init (cyclomatic 21) · ×1
  • index.FolioConsole.React.init (cyclomatic 21) react/src/index.js:31 — index.FolioConsole.React.init has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImageCell.wrap_style (cyclomatic 20) · ×1
  • ImageCell.wrap_style (cyclomatic 20) app/cells/folio/image_cell.rb:103 — ImageCell.wrap_style has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImageComponent.wrap_style (cyclomatic 20) · ×1
  • ImageComponent.wrap_style (cyclomatic 20) app/components/folio/console/ui/image_component.rb:162 — ImageComponent.wrap_style has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileControllerBase.update_thumbnails_crop (cyclomatic 20) · ×1
  • FileControllerBase.update_thumbnails_crop (cyclomatic 20) app/controllers/concerns/folio/console/api/file_controller_base.rb:245 — FileControllerBase.update_thumbnails_crop has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MigrateSubtitleDataToVideoSubtitles.up (cyclomatic 20) · ×1
  • MigrateSubtitleDataToVideoSubtitles.up (cyclomatic 20) db/migrate/20250716062032_migrate_subtitle_data_to_video_subtitles.rb:4 — MigrateSubtitleDataToVideoSubtitles.up has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.default · ×1
  • index.default::renderMetadataRow (cyclomatic 20) react/src/components/ReadOnlyMetadataDisplay/index.js:88 — index.default::renderMetadataRow has cyclomatic complexity 20 (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. This shape REPEATS in the file: one other method here (index.default) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · notesFields.notesFieldsReducer (cyclomatic 20) · ×1
  • notesFields.notesFieldsReducer (cyclomatic 20) react/src/ducks/notesFields.js:186 — notesFields.notesFieldsReducer has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) · ×1
  • (anonymous)::renderMetadataRow (cyclomatic 20) react/src/components/ReadOnlyMetadataDisplay/index.js:88 — (anonymous)::renderMetadataRow has cyclomatic complexity 20 (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.
D1 · Cyclomatic Complexity · makeOnChange (cyclomatic 20) · ×1
  • makeOnChange (cyclomatic 20) app/assets/javascripts/folio/input/date_time.js:245 — makeOnChange has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function items inside it that branch (unbind, connect, a function literal at line 245, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ActionsCell.actions_ary (cyclomatic 19) · ×1
  • ActionsCell.actions_ary (cyclomatic 19) app/cells/folio/console/index/actions_cell.rb:104 — ActionsCell.actions_ary 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.
D1 · Cyclomatic Complexity · PreviewUrlFor.preview_url_for (cyclomatic 19) · ×1
  • PreviewUrlFor.preview_url_for (cyclomatic 19) app/lib/folio/console/preview_url_for.rb:49 — PreviewUrlFor.preview_url_for 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.
D1 · Cyclomatic Complexity · queueAutosaveIfPossible (cyclomatic 19) · ×1
  • queueAutosaveIfPossible (cyclomatic 19) app/components/folio/console/form/footer_component.js:85 — queueAutosaveIfPossible 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.
D1 · Cyclomatic Complexity · ActionsCell.render_actions (cyclomatic 18) · ×1
  • ActionsCell.render_actions (cyclomatic 18) app/cells/folio/console/index/actions_cell.rb:139 — ActionsCell.render_actions has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileComponent.unmet_requirements (cyclomatic 18) · ×1
  • FileComponent.unmet_requirements (cyclomatic 18) app/components/folio/file_list/file_component.rb:95 — FileComponent.unmet_requirements 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.
D1 · Cyclomatic Complexity · ProseMirrorNodeComponent.resolve_tag_attributes (cyclomatic 18) · ×1
  • ProseMirrorNodeComponent.resolve_tag_attributes (cyclomatic 18) app/components/folio/tiptap/content/prose_mirror_node_component.rb:54 — ProseMirrorNodeComponent.resolve_tag_attributes 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.
D1 · Cyclomatic Complexity · Auditor.get_folio_audited_changed_relations (cyclomatic 18) · ×1
  • Auditor.get_folio_audited_changed_relations (cyclomatic 18) app/lib/folio/audited/auditor.rb:64 — Auditor.get_folio_audited_changed_relations 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.
D1 · Cyclomatic Complexity · remote_scripts.Folio.RemoteScripts.run (cyclomatic 18) · ×1
  • remote_scripts.Folio.RemoteScripts.run (cyclomatic 18) app/assets/javascripts/folio/remote_scripts.js:125 — remote_scripts.Folio.RemoteScripts.run has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · atoms.updateAtomPreviews (cyclomatic 18) · ×1
  • atoms.updateAtomPreviews (cyclomatic 18) react/src/ducks/atoms.js:268 — atoms.updateAtomPreviews has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · reload (cyclomatic 18) · ×1
  • reload (cyclomatic 18) app/components/folio/file_list/file_component.js:151 — reload has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 184, 167, 179, …). 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.
D1 · Cyclomatic Complexity · fillFromParent (cyclomatic 18) · ×1
  • fillFromParent (cyclomatic 18) app/components/folio/console/file_placements/multi_picker_fields/placement_component.js:28 — fillFromParent 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.
D1 · Cyclomatic Complexity · CheckProgressJob.fetch_job_response (cyclomatic 17) · ×1
  • CheckProgressJob.fetch_job_response (cyclomatic 17) app/jobs/folio/cra_media_cloud/check_progress_job.rb:108 — CheckProgressJob.fetch_job_response has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsToHash.settingsToHash (cyclomatic 17) · ×1
  • settingsToHash.settingsToHash (cyclomatic 17) react/src/utils/settingsToHash.js:4 — settingsToHash.settingsToHash has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 12). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · batchAction (cyclomatic 17) · ×1
  • batchAction (cyclomatic 17) app/components/folio/console/files/batch/bar_component.js:127 — batchAction has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · onTriggerClick (cyclomatic 17) · ×1
  • onTriggerClick (cyclomatic 17) REDACTED:6 — onTriggerClick has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 51, 36). 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.
D1 · Cyclomatic Complexity · AutocompletesController.selectize (cyclomatic 16) · ×1
  • AutocompletesController.selectize (cyclomatic 16) app/controllers/folio/console/api/autocompletes_controller.rb:136 — AutocompletesController.selectize has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InvitationsController.create (cyclomatic 16) · ×1
  • InvitationsController.create (cyclomatic 16) app/controllers/folio/users/invitations_controller.rb:34 — InvitationsController.create has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Auditor.get_atoms_attributes_for_reconstruction (cyclomatic 16) · ×1
  • Auditor.get_atoms_attributes_for_reconstruction (cyclomatic 16) app/lib/folio/audited/auditor.rb:314 — Auditor.get_atoms_attributes_for_reconstruction has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MethodMissing.method_missing_association (cyclomatic 16) · ×1
  • MethodMissing.method_missing_association (cyclomatic 16) app/models/concerns/folio/atom/method_missing.rb:54 — MethodMissing.method_missing_association has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HasAttachments.validate_file_placements_if_needed (cyclomatic 16) · ×1
  • HasAttachments.validate_file_placements_if_needed (cyclomatic 16) app/models/concerns/folio/has_attachments.rb:356 — HasAttachments.validate_file_placements_if_needed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · File.validate_attribution_and_texts_if_needed (cyclomatic 16) · ×1
  • File.validate_attribution_and_texts_if_needed (cyclomatic 16) app/models/folio/file.rb:545 — File.validate_attribution_and_texts_if_needed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Base.console_warnings (cyclomatic 16) · ×1
  • Base.console_warnings (cyclomatic 16) app/models/folio/file_placement/base.rb:234 — Base.console_warnings 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.
D1 · Cyclomatic Complexity · add_params_to_url.deepMergeParams (cyclomatic 16) · ×1
  • add_params_to_url.deepMergeParams (cyclomatic 16) app/assets/javascripts/folio/add_params_to_url.js:67 — add_params_to_url.deepMergeParams has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: app/assets/javascripts/folio/input/date_time.js app/assets/javascripts/folio/input/date_time.js:229 — app/assets/javascripts/folio/input/date_time.js changed 9 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is date_time.Folio.Input.DateTime.shouldHideOnChange at line 229), 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: “revert(input): drop the document-wide double click guard of the date-time picker”; “fix(input): stop a double click on a closing day from reaching the page”; “fix(input): cover Safari and the double click on a closing day”; “fix(input): ignore invalid picks when deciding the date-time picker close”. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 13:12:25 +01:00' --until='2026-11-05 13:12:25 +01:00' --full-history --no-merges -- app/assets/javascripts/folio/input/date_time.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · AutocompletesController.react_select (cognitive 104) · ×1
  • AutocompletesController.react_select (cognitive 104) app/controllers/folio/console/api/autocompletes_controller.rb:257 — AutocompletesController.react_select has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (87 pts), boolean chains 14, ternaries 1 (3 pts) (nesting depth added 58). 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.
D2 · Cognitive Complexity · atomsReducer (cognitive 99) · ×1
  • atomsReducer (cognitive 99) react/src/ducks/atoms.js:484 — atomsReducer has cognitive complexity 99 (threshold 15). Drivers by points: if/else 47 (91 pts), ternaries 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 47). Most of this is not in the body itself: 9 of the 99 points are its own statements and the rest belongs to 26 function literals inside it that branch (lines 727, 913, 780, …). 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.
D2 · Cognitive Complexity · ListComponent.records_data (cognitive 80) · ×1
  • ListComponent.records_data (cognitive 80) REDACTED:14 — ListComponent.records_data has cognitive complexity 80 (threshold 15). Drivers by points: if/else 30 (72 pts), boolean chains 7, ternaries 1 (nesting depth added 42). 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.
D2 · Cognitive Complexity · index.default (cognitive 77) · ×1
  • index.default (cognitive 77) react/src/containers/FileModal/FileModalFile/index.js:27 — index.default has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 42, ternaries 22 (32 pts), if/else 3 (nesting depth added 10). Of this number, 69 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MethodMissing.method_missing_data (cognitive 75) · ×1
  • MethodMissing.method_missing_data (cognitive 75) app/models/concerns/folio/atom/method_missing.rb:102 — MethodMissing.method_missing_data has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (53 pts), error handling 3 (12 pts), boolean chains 10 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenerateThumbnailJob.make_thumb (cognitive 74) · ×1
  • GenerateThumbnailJob.make_thumb (cognitive 74) app/jobs/folio/generate_thumbnail_job.rb:74 — GenerateThumbnailJob.make_thumb has cognitive complexity 74 (threshold 15). Drivers by points: if/else 33 (51 pts), boolean chains 19, match/switch 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · consolePreviewTemplate (cognitive 67) · ×1
  • consolePreviewTemplate (cognitive 67) app/assets/javascripts/folio/s3_upload.js:33 — consolePreviewTemplate has cognitive complexity 67 (threshold 15). Drivers by points: if/else 36 (51 pts), boolean chains 12, error handling 2, match/switch 1, ternaries 1 (nesting depth added 15). None of this is in the body itself: all 67 points belong to 26 function items inside it that branch (a function literal at line 219, createDropzone::error, a function literal at line 165, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · initThumbnails (cognitive 66) · ×1
  • initThumbnails (cognitive 66) app/assets/javascripts/folio/thumbnails.js:2 — initThumbnails has cognitive complexity 66 (threshold 15). Drivers by points: if/else 29 (39 pts), boolean chains 13, error handling 5 (6 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 14). Most of this is not in the body itself: 2 of the 66 points are its own statements and the rest belongs to 27 function items inside it that branch (updateImageSources, dataFromString, a function literal at line 279, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · input.registerAiInputController (cognitive 57) · ×1
  • input.registerAiInputController (cognitive 57) packs/ai/app/assets/javascripts/folio/ai/input.js:27 — input.registerAiInputController has cognitive complexity 57 (threshold 15). Drivers by points: if/else 36, boolean chains 15, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 56 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImageCell.wrap_style (cognitive 56) · ×1
  • ImageCell.wrap_style (cognitive 56) app/cells/folio/image_cell.rb:103 — ImageCell.wrap_style has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (52 pts), boolean chains 4 (nesting depth added 31). 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.
D2 · Cognitive Complexity · NodeBuilder.setup_structure_for_folio_attachment (cognitive 54) · ×1
  • NodeBuilder.setup_structure_for_folio_attachment (cognitive 54) app/lib/folio/tiptap/node_builder.rb:279 — NodeBuilder.setup_structure_for_folio_attachment has cognitive complexity 54 (threshold 15). Drivers by points: if/else 30 (49 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · index.default (cognitive 54) · ×1
  • index.default (cognitive 54) react/src/components/ReadOnlyMetadataDisplay/index.js:3 — index.default has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 78, if/else 20 (23 pts), ternaries 5 (6 pts), loops 1 (nesting depth added 4). 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. This shape REPEATS in the file: one other method here (index.default::renderMetadataRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous) (cognitive 54) · ×1
  • (anonymous) (cognitive 54) react/src/components/ReadOnlyMetadataDisplay/index.js:3 — (anonymous) has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 79, if/else 20 (23 pts), ternaries 6 (8 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SidebarCell.link_from (cognitive 53) · ×1
  • SidebarCell.link_from (cognitive 53) app/cells/folio/console/layout/sidebar_cell.rb:66 — SidebarCell.link_from has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (35 pts), error handling 3 (9 pts), boolean chains 6, ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · ImageComponent.set_data (cognitive 51) · ×1
  • ImageComponent.set_data (cognitive 51) app/components/folio/console/ui/image_component.rb:54 — ImageComponent.set_data has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 20 (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.
D2 · Cognitive Complexity · render (cognitive 49) · ×1
  • render (cognitive 49) react/src/components/AtomForm/index.js:163 — render has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 12 (14 pts), boolean chains 9 (nesting depth added 10). Most of this is not in the body itself: 5 of the 49 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 245, (anonymous)::fillOutput, a function literal at line 182, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · fileModal.modalReducer (cognitive 45) · ×1
  • fileModal.modalReducer (cognitive 45) react/src/ducks/fileModal.js:263 — fileModal.modalReducer has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 11, match/switch 1 (nesting depth added 11). 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.
D2 · Cognitive Complexity · AutocompletesController.select2 (cognitive 44) · ×1
  • AutocompletesController.select2 (cognitive 44) app/controllers/folio/console/api/autocompletes_controller.rb:187 — AutocompletesController.select2 has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render · ×1
  • render::loadOptions (cognitive 44) react/src/components/Select/index.js:172 — render::loadOptions has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 18, error handling 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AasmController.event (cognitive 40) · ×1
  • AasmController.event (cognitive 40) app/controllers/folio/console/api/aasm_controller.rb:4 — AasmController.event has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 22). 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.
D2 · Cognitive Complexity · MethodMissing.method_missing_association (cognitive 39) · ×1
  • MethodMissing.method_missing_association (cognitive 39) app/models/concerns/folio/atom/method_missing.rb:54 — MethodMissing.method_missing_association has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 4 (14 pts), boolean chains 5 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.FolioConsole.React.init (cognitive 39) · ×1
  • index.FolioConsole.React.init (cognitive 39) react/src/index.js:31 — index.FolioConsole.React.init has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 18). Of this number, 16 points are the body's own statements and 23 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AutocompletesController.show (cognitive 38) · ×1
  • AutocompletesController.show (cognitive 38) app/controllers/folio/console/api/autocompletes_controller.rb:7 — AutocompletesController.show has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · ProseMirrorNodeComponent.resolve_tag_attributes (cognitive 37) · ×1
  • ProseMirrorNodeComponent.resolve_tag_attributes (cognitive 37) app/components/folio/tiptap/content/prose_mirror_node_component.rb:54 — ProseMirrorNodeComponent.resolve_tag_attributes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · s3_upload.Folio.S3Upload.createDropzone (cognitive 36) · ×1
  • s3_upload.Folio.S3Upload.createDropzone (cognitive 36) app/assets/javascripts/folio/s3_upload.js:43 — s3_upload.Folio.S3Upload.createDropzone has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 12 (nesting depth added 4). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 114, 165, 81, …). 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.
D2 · Cognitive Complexity · startAutoScroll · ×1
  • startAutoScroll::performAutoScroll (cognitive 36) app/components/folio/nested_fields_component.js:532 — startAutoScroll::performAutoScroll has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 10 (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.
D2 · Cognitive Complexity · fillFromParent (cognitive 35) · ×1
  • fillFromParent (cognitive 35) app/components/folio/console/file_placements/multi_picker_fields/placement_component.js:28 — fillFromParent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 1 (3 pts), loops 1 (3 pts), other 3, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Select.render (cognitive 34) · ×1
  • Select.render (cognitive 34) react/src/components/Select/index.js:86 — Select.render has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 21, if/else 9 (11 pts), ternaries 2 (nesting depth added 2). 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.
D2 · Cognitive Complexity · settingsToHash.settingsToHash (cognitive 34) · ×1
  • settingsToHash.settingsToHash (cognitive 34) react/src/utils/settingsToHash.js:4 — settingsToHash.settingsToHash has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (28 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 16). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to one function literal inside it that branches (line 12). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · filesReducer (cognitive 34) · ×1
  • filesReducer (cognitive 34) react/src/ducks/files.js:325 — filesReducer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 13). Of this number, 16 points are the body's own statements and 18 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageComponent.wrap_style (cognitive 33) · ×1
  • ImageComponent.wrap_style (cognitive 33) app/components/folio/console/ui/image_component.rb:162 — ImageComponent.wrap_style has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · AtomInput (cognitive 33) · ×1
  • AtomInput (cognitive 33) react/src/components/AtomForm/AtomInput.js:37 — AtomInput has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 11, ternaries 2 (4 pts) (nesting depth added 7). Of this number, 21 points are the body's own statements and 12 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ButtonComponent.tag (cognitive 32) · ×1
  • ButtonComponent.tag (cognitive 32) app/components/folio/console/ui/button_component.rb:63 — ButtonComponent.tag has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (29 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Headers.set_cache_control_headers (cognitive 32) · ×1
  • Headers.set_cache_control_headers (cognitive 32) app/controllers/concerns/folio/http_cache/headers.rb:12 — Headers.set_cache_control_headers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 6 (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.
D2 · Cognitive Complexity · OmniauthCallbacksController.bind_user_and_redirect (cognitive 32) · ×1
  • OmniauthCallbacksController.bind_user_and_redirect (cognitive 32) REDACTED:113 — OmniauthCallbacksController.bind_user_and_redirect has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Auditor.get_folio_audited_changed_relations (cognitive 31) · ×1
  • Auditor.get_folio_audited_changed_relations (cognitive 31) app/lib/folio/audited/auditor.rb:64 — Auditor.get_folio_audited_changed_relations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 6 (nesting depth added 13). 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.
D2 · Cognitive Complexity · embed.createEmbedElement (cognitive 31) · ×1
  • embed.createEmbedElement (cognitive 31) data/embed/source/embed.js:98 — embed.createEmbedElement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 3 (9 pts), boolean chains 2, match/switch 1 (nesting depth added 13). Of this number, 28 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.
D2 · Cognitive Complexity · open (cognitive 31) · ×1
  • open (cognitive 31) app/components/folio/console/ui/notification_modal_component.js:67 — open has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (12 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AutocompletesController.selectize (cognitive 30) · ×1
  • AutocompletesController.selectize (cognitive 30) app/controllers/folio/console/api/autocompletes_controller.rb:136 — AutocompletesController.selectize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · InvitationsController.create (cognitive 30) · ×1
  • InvitationsController.create (cognitive 30) app/controllers/folio/users/invitations_controller.rb:34 — InvitationsController.create has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · ReactHelper.react_ordered_multiselect (cognitive 30) · ×1
  • ReactHelper.react_ordered_multiselect (cognitive 30) app/helpers/folio/console/react_helper.rb:139 — ReactHelper.react_ordered_multiselect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Auditor.fill_ids_to_folio_data (cognitive 30) · ×1
  • Auditor.fill_ids_to_folio_data (cognitive 30) app/lib/folio/audited/auditor.rb:117 — Auditor.fill_ids_to_folio_data has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (30 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.
D2 · Cognitive Complexity · Auditor.get_atoms_attributes_for_reconstruction (cognitive 30) · ×1
  • Auditor.get_atoms_attributes_for_reconstruction (cognitive 30) app/lib/folio/audited/auditor.rb:314 — Auditor.get_atoms_attributes_for_reconstruction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 13). 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.
D2 · Cognitive Complexity · reload (cognitive 30) · ×1
  • reload (cognitive 30) app/components/folio/file_list/file_component.js:151 — reload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 15). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 184, 167, 179, …). 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.
D2 · Cognitive Complexity · run (cognitive 30) · ×1
  • run (cognitive 30) app/assets/javascripts/folio/remote_scripts.js:125 — run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 13). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeBuilder.get_tiptap_config (cognitive 29) · ×1
  • NodeBuilder.get_tiptap_config (cognitive 29) app/lib/folio/tiptap/node_builder.rb:707 — NodeBuilder.get_tiptap_config has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FileComponent.unmet_requirements (cognitive 28) · ×1
  • FileComponent.unmet_requirements (cognitive 28) app/components/folio/file_list/file_component.rb:95 — FileComponent.unmet_requirements has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · form_to_hash.Folio.formToHash (cognitive 28) · ×1
  • form_to_hash.Folio.formToHash (cognitive 28) app/assets/javascripts/folio/form_to_hash.js:5 — form_to_hash.Folio.formToHash has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 17). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · text_suggestions_group_component.registerTextSuggestionsGroupController (cognitive 28) · ×1
  • text_suggestions_group_component.registerTextSuggestionsGroupController (cognitive 28) packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js:2 — text_suggestions_group_component.registerTextSuggestionsGroupController has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, boolean chains 7, ternaries 1. Of this number, 25 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · notesFields.notesFieldsReducer (cognitive 28) · ×1
  • notesFields.notesFieldsReducer (cognitive 28) react/src/ducks/notesFields.js:186 — notesFields.notesFieldsReducer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (6 pts), match/switch 1 (nesting depth added 13). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 192, 335, 259, …). 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.
D2 · Cognitive Complexity · init (cognitive 28) · ×1
  • init (cognitive 28) app/components/folio/uppy_component.js:68 — init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (17 pts), error handling 5 (8 pts), boolean chains 3 (nesting depth added 5). Of this number, 20 points are the body's own statements and 8 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ActionsCell.actions_ary (cognitive 27) · ×1
  • ActionsCell.actions_ary (cognitive 27) app/cells/folio/console/index/actions_cell.rb:104 — ActionsCell.actions_ary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · ActionsCell.render_actions (cognitive 26) · ×1
  • ActionsCell.render_actions (cognitive 26) app/cells/folio/console/index/actions_cell.rb:139 — ActionsCell.render_actions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D2 · Cognitive Complexity · MenusController.update (cognitive 26) · ×1
  • MenusController.update (cognitive 26) app/controllers/folio/console/menus_controller.rb:14 — MenusController.update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (26 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewUrlFor.preview_url_for (cognitive 26) · ×1
  • PreviewUrlFor.preview_url_for (cognitive 26) app/lib/folio/console/preview_url_for.rb:49 — PreviewUrlFor.preview_url_for has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · asyncJobRequest (cognitive 26) · ×1
  • asyncJobRequest (cognitive 26) packs/ai/app/assets/javascripts/folio/ai/request.js:5 — asyncJobRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 2, error handling 1 (nesting depth added 5). None of this is in the body itself: all 26 points belong to 18 function items inside it that branch (receiveMessage, a function literal at line 38, a function literal at line 28, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ImageCell.data (cognitive 25) · ×1
  • ImageCell.data (cognitive 25) app/cells/folio/image_cell.rb:25 — ImageCell.data has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AutocompletesController.field (cognitive 25) · ×1
  • AutocompletesController.field (cognitive 25) app/controllers/folio/console/api/autocompletes_controller.rb:70 — AutocompletesController.field has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · batchAction (cognitive 25) · ×1
  • batchAction (cognitive 25) app/components/folio/console/files/batch/bar_component.js:127 — batchAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 4, loops 2 (4 pts), match/switch 1, ternaries 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.
D2 · Cognitive Complexity · PaginationComponent (cognitive 25) · ×1
  • PaginationComponent (cognitive 25) REDACTED:24 — PaginationComponent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 8, boolean chains 7, loops 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · onTriggerClick (cognitive 25) · ×1
  • onTriggerClick (cognitive 25) REDACTED:6 — onTriggerClick has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 51, 36). 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.
D2 · Cognitive Complexity · DefaultActions.respond_with_location (cognitive 24) · ×1
  • DefaultActions.respond_with_location (cognitive 24) app/controllers/concerns/folio/console/default_actions.rb:273 — DefaultActions.respond_with_location has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (8 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 12). 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 24) · ×1
  • (anonymous) (cognitive 24) react/src/containers/FileModal/FileModalFile/index.js:27 — (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, ternaries 6, if/else 3. Of this number, 23 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · makeOnChange (cognitive 24) · ×1
  • makeOnChange (cognitive 24) app/assets/javascripts/folio/input/date_time.js:245 — makeOnChange has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 2, ternaries 1 (nesting depth added 4). None of this is in the body itself: all 24 points belong to 5 function items inside it that branch (unbind, connect, a function literal at line 245, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ContentComponent.javascript_code_for_broken_data (cognitive 23) · ×1
  • ContentComponent.javascript_code_for_broken_data (cognitive 23) app/components/folio/tiptap/content_component.rb:52 — ContentComponent.javascript_code_for_broken_data has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (23 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TabsHelper.tabs (cognitive 23) · ×1
  • TabsHelper.tabs (cognitive 23) app/helpers/folio/console/tabs_helper.rb:4 — TabsHelper.tabs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Auditor.get_file_placements_attributes_for_reconstruction (cognitive 23) · ×1
  • Auditor.get_file_placements_attributes_for_reconstruction (cognitive 23) app/lib/folio/audited/auditor.rb:253 — Auditor.get_file_placements_attributes_for_reconstruction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewUrlFor.preview_url_for_page (cognitive 23) · ×1
  • PreviewUrlFor.preview_url_for_page (cognitive 23) app/lib/folio/console/preview_url_for.rb:4 — PreviewUrlFor.preview_url_for_page has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MigrateSubtitleDataToVideoSubtitles.up (cognitive 23) · ×1
  • MigrateSubtitleDataToVideoSubtitles.up (cognitive 23) db/migrate/20250716062032_migrate_subtitle_data_to_video_subtitles.rb:4 — MigrateSubtitleDataToVideoSubtitles.up has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (2 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.
D2 · Cognitive Complexity · AtomsHelper.render_molecule (cognitive 22) · ×1
  • AtomsHelper.render_molecule (cognitive 22) app/helpers/folio/atoms_helper.rb:52 — AtomsHelper.render_molecule has cognitive complexity 22 (threshold 15). Drivers by points: error handling 3 (10 pts), if/else 6 (9 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HasAttachments.validate_file_placements_if_needed (cognitive 22) · ×1
  • HasAttachments.validate_file_placements_if_needed (cognitive 22) app/models/concerns/folio/has_attachments.rb:356 — HasAttachments.validate_file_placements_if_needed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IptcFieldMapper.unmojibake (cognitive 22) · ×1
  • IptcFieldMapper.unmojibake (cognitive 22) app/services/folio/metadata/iptc_field_mapper.rb:853 — IptcFieldMapper.unmojibake has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queueAutosaveIfPossible (cognitive 22) · ×1
  • queueAutosaveIfPossible (cognitive 22) app/components/folio/console/form/footer_component.js:85 — queueAutosaveIfPossible has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · handleResponse (cognitive 22) · ×1
  • handleResponse (cognitive 22) app/components/folio/console/form_modal_component.js:58 — handleResponse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileControllerBase.update_thumbnails_crop (cognitive 21) · ×1
  • FileControllerBase.update_thumbnails_crop (cognitive 21) app/controllers/concerns/folio/console/api/file_controller_base.rb:245 — FileControllerBase.update_thumbnails_crop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · save (cognitive 21) · ×1
  • save (cognitive 21) app/components/folio/console/ui/ajax_input_component.js:201 — save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (7 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). Of this number, 16 points are the body's own statements and 5 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileTableRow (cognitive 21) · ×1
  • FileTableRow (cognitive 21) react/src/components/FileList/FileTableList/FileTableRow/index.js:11 — FileTableRow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 7, boolean chains 6 (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.
D2 · Cognitive Complexity · StimulusHelper.stimulus_data (cognitive 20) · ×1
  • StimulusHelper.stimulus_data (cognitive 20) app/helpers/folio/stimulus_helper.rb:25 — StimulusHelper.stimulus_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Encoder.upload_with_retry (cognitive 20) · ×1
  • Encoder.upload_with_retry (cognitive 20) app/lib/folio/cra_media_cloud/encoder.rb:151 — Encoder.upload_with_retry has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 5 (9 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Report.respect_max_date_spans_count_and_create_spans (cognitive 20) · ×1
  • Report.respect_max_date_spans_count_and_create_spans (cognitive 20) app/lib/folio/report.rb:84 — Report.respect_max_date_spans_count_and_create_spans has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 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.
D2 · Cognitive Complexity · NodeBuilder.setup_structure_for_collection (cognitive 20) · ×1
  • NodeBuilder.setup_structure_for_collection (cognitive 20) app/lib/folio/tiptap/node_builder.rb:111 — NodeBuilder.setup_structure_for_collection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, match/switch 1 (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.
D2 · Cognitive Complexity · NodeBuilder.setup_structure_for_url_json (cognitive 20) · ×1
  • NodeBuilder.setup_structure_for_url_json (cognitive 20) app/lib/folio/tiptap/node_builder.rb:177 — NodeBuilder.setup_structure_for_url_json has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · File.validate_attribution_and_texts_if_needed (cognitive 20) · ×1
  • File.validate_attribution_and_texts_if_needed (cognitive 20) app/models/folio/file.rb:545 — File.validate_attribution_and_texts_if_needed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · atoms.updateAtomPreviews (cognitive 20) · ×1
  • atoms.updateAtomPreviews (cognitive 20) react/src/ducks/atoms.js:268 — atoms.updateAtomPreviews has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D2 · Cognitive Complexity · onKeyUp (cognitive 20) · ×1
  • onKeyUp (cognitive 20) app/components/folio/console/ui/ajax_input_component.js:66 — onKeyUp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActionsCell.show (cognitive 19) · ×1
  • ActionsCell.show (cognitive 19) app/cells/folio/console/index/actions_cell.rb:4 — ActionsCell.show has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IndexFilters.select2_select (cognitive 19) · ×1
  • IndexFilters.select2_select (cognitive 19) app/lib/folio/console/component/index_filters.rb:54 — IndexFilters.select2_select has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Base.data_to_h (cognitive 19) · ×1
  • Base.data_to_h (cognitive 19) app/models/folio/atom/base.rb:176 — Base.data_to_h has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1 (nesting depth added 10). 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.
D2 · Cognitive Complexity · IptcFieldMapper.map_metadata (cognitive 19) · ×1
  • IptcFieldMapper.map_metadata (cognitive 19) app/services/folio/metadata/iptc_field_mapper.rb:595 — IptcFieldMapper.map_metadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (5 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.
D2 · Cognitive Complexity · IptcFieldMapper.fix_utf8_mojibake (cognitive 19) · ×1
  • IptcFieldMapper.fix_utf8_mojibake (cognitive 19) app/services/folio/metadata/iptc_field_mapper.rb:914 — IptcFieldMapper.fix_utf8_mojibake has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (8 pts), if/else 4 (7 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · api.jsonError (cognitive 19) · ×1
  • api.jsonError (cognitive 19) app/assets/javascripts/folio/api.js:53 — api.jsonError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 61, 60). 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.
D2 · Cognitive Complexity · (anonymous) · ×1
  • (anonymous)::renderMetadataRow (cognitive 19) react/src/components/ReadOnlyMetadataDisplay/index.js:88 — (anonymous)::renderMetadataRow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · listenOnMessageBus (cognitive 19) · ×1
  • listenOnMessageBus (cognitive 19) react/src/containers/FileModal/index.js:117 — listenOnMessageBus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 122). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · onBlur (cognitive 19) · ×1
  • onBlur (cognitive 19) app/components/folio/console/ui/in_place_input_component.js:13 — onBlur has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2 (nesting depth added 10). 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, 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.
D2 · Cognitive Complexity · JwPlayerController.video_url (cognitive 18) · ×1
  • JwPlayerController.video_url (cognitive 18) app/controllers/folio/console/api/jw_player_controller.rb:4 — JwPlayerController.video_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3 (nesting depth added 9). 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.
D2 · Cognitive Complexity · CrossdomainHandler.handle_on_master_site! (cognitive 18) · ×1
  • CrossdomainHandler.handle_on_master_site! (cognitive 18) app/lib/folio/devise/crossdomain_handler.rb:83 — CrossdomainHandler.handle_on_master_site! has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Exporter.attachments_hash (cognitive 18) · ×1
  • Exporter.attachments_hash (cognitive 18) app/lib/folio/transportable/exporter.rb:57 — Exporter.attachments_hash has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3 (nesting depth added 9). 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.
D2 · Cognitive Complexity · Base.validate_attribution_if_needed (cognitive 18) · ×1
  • Base.validate_attribution_if_needed (cognitive 18) app/models/folio/file_placement/base.rb:149 — Base.validate_attribution_if_needed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · Base.validate_alt_if_needed (cognitive 18) · ×1
  • Base.validate_alt_if_needed (cognitive 18) app/models/folio/file_placement/base.rb:173 — Base.validate_alt_if_needed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · html_auto_format.FolioConsole.HtmlAutoFormat.loopNode (cognitive 18) · ×1
  • html_auto_format.FolioConsole.HtmlAutoFormat.loopNode (cognitive 18) REDACTED:165 — html_auto_format.FolioConsole.HtmlAutoFormat.loopNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 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.
D2 · Cognitive Complexity · combineAtoms.combineAtoms (cognitive 18) · ×1
  • combineAtoms.combineAtoms (cognitive 18) react/src/utils/combineAtoms.js:5 — combineAtoms.combineAtoms has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (nesting depth added 8). Of this number, 9 points are the body's own statements and 9 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · handleAutocompleteActive (cognitive 18) · ×1
  • handleAutocompleteActive (cognitive 18) app/assets/javascripts/folio/input/autocomplete.js:162 — handleAutocompleteActive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · deepMergeParams (cognitive 18) · ×1
  • deepMergeParams (cognitive 18) app/assets/javascripts/folio/add_params_to_url.js:67 — deepMergeParams has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 76). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · submit (cognitive 18) · ×1
  • submit (cognitive 18) app/components/folio/console/ui/index/filters_component.js:10 — submit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetMetaVariables.set_meta_variables (cognitive 17) · ×1
  • SetMetaVariables.set_meta_variables (cognitive 17) app/controllers/concerns/folio/set_meta_variables.rb:6 — SetMetaVariables.set_meta_variables has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseController.folio_console_controller_for (cognitive 17) · ×1
  • BaseController.folio_console_controller_for (cognitive 17) REDACTED:36 — BaseController.folio_console_controller_for has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 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.
D2 · Cognitive Complexity · EmbedInput.input (cognitive 17) · ×1
  • EmbedInput.input (cognitive 17) app/inputs/embed_input.rb:4 — EmbedInput.input has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CheckProgressJob.fetch_job_response (cognitive 17) · ×1
  • CheckProgressJob.fetch_job_response (cognitive 17) app/jobs/folio/cra_media_cloud/check_progress_job.rb:108 — CheckProgressJob.fetch_job_response has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · TranscribeSubtitlesJob.perform (cognitive 17) · ×1
  • TranscribeSubtitlesJob.perform (cognitive 17) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:13 — TranscribeSubtitlesJob.perform has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D2 · Cognitive Complexity · Encoder.with_robust_sftp_session (cognitive 17) · ×1
  • Encoder.with_robust_sftp_session (cognitive 17) app/lib/folio/cra_media_cloud/encoder.rb:84 — Encoder.with_robust_sftp_session has cognitive complexity 17 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.default · ×1
  • index.default::renderMetadataRow (cognitive 17) react/src/components/ReadOnlyMetadataDisplay/index.js:88 — index.default::renderMetadataRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. 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. This shape REPEATS in the file: one other method here (index.default) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · wrapActions (cognitive 17) · ×1
  • wrapActions (cognitive 17) app/assets/javascripts/folio/input/date_time.js:156 — wrapActions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 161, restoreActions). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CreateFileJob.perform_for_valid (cognitive 16) · ×1
  • CreateFileJob.perform_for_valid (cognitive 16) REDACTED:4 — CreateFileJob.perform_for_valid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PregenerateThumbnails.pregenerate_thumbnails (cognitive 16) · ×1
  • PregenerateThumbnails.pregenerate_thumbnails (cognitive 16) app/models/concerns/folio/pregenerate_thumbnails.rb:74 — PregenerateThumbnails.pregenerate_thumbnails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D2 · Cognitive Complexity · Thumbnails.development_safe_file (cognitive 16) · ×1
  • Thumbnails.development_safe_file (cognitive 16) REDACTED:199 — Thumbnails.development_safe_file has cognitive complexity 16 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (4 pts), ternaries 1 (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.
D2 · Cognitive Complexity · Base.validate_description_if_needed (cognitive 16) · ×1
  • Base.validate_description_if_needed (cognitive 16) app/models/folio/file_placement/base.rb:204 — Base.validate_description_if_needed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · ExtractionService.update_database_fields (cognitive 16) · ×1
  • ExtractionService.update_database_fields (cognitive 16) app/services/folio/metadata/extraction_service.rb:85 — ExtractionService.update_database_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add_params_to_url.Folio.objectToRailsStyleQueryString (cognitive 16) · ×1
  • add_params_to_url.Folio.objectToRailsStyleQueryString (cognitive 16) app/assets/javascripts/folio/add_params_to_url.js:9 — add_params_to_url.Folio.objectToRailsStyleQueryString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (walk, a function literal at line 38, a function literal at line 26). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · atomsDefaultDataFromStructure.atomsDefaultDataFromStructure (cognitive 16) · ×1
  • atomsDefaultDataFromStructure.atomsDefaultDataFromStructure (cognitive 16) react/src/utils/atomsDefaultDataFromStructure.js:1 — atomsDefaultDataFromStructure.atomsDefaultDataFromStructure has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertCharacter (cognitive 16) · ×1
  • insertCharacter (cognitive 16) app/components/folio/special_characters/popup_component.js:110 — insertCharacter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (4 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · load (cognitive 16) · ×1
  • load (cognitive 16) app/assets/javascripts/folio/remote_scripts.js:60 — load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleLoadSuccess (cognitive 16) · ×1
  • handleLoadSuccess (cognitive 16) app/cells/folio/console/report/report.js:57 — handleLoadSuccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · changedInUrlPicker (cognitive 16) · ×1
  • changedInUrlPicker (cognitive 16) app/components/folio/console/links/modal/form_component.js:55 — changedInUrlPicker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) app/controllers/folio/console/api/autocompletes_controller.rb:137 — app/controllers/folio/console/api/autocompletes_controller.rb:137-184 | app/controllers/folio/console/api/autocompletes_controller.rb:188-254 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:202 — app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:202-224 | db/migrate/20250716062032_migrate_subtitle_data_to_video_subtitles.rb:150-168 — 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 (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) db/migrate/20171027131622_create_visits.rb:5 — db/migrate/20171027131622_create_visits.rb:5-61 | db/migrate/20210204114506_drop_unwanted_ahoy.rb:21-94 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) app/cells/folio/console/atoms/previews_cell.rb:85 — app/cells/folio/console/atoms/previews_cell.rb:85-116 | app/cells/folio/console/atoms/previews_cell.rb:120-150 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) app/helpers/folio/atoms_helper.rb:26 — app/helpers/folio/atoms_helper.rb:26-49 | app/helpers/folio/atoms_helper.rb:53-84 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) REDACTED:22 — REDACTED:22-39 | REDACTED:43-61 — 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 copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) app/jobs/folio/jw_player/create_full_media_job.rb:12 — app/jobs/folio/jw_player/create_full_media_job.rb:12-31 | app/jobs/folio/jw_player/create_preview_media_job.rb:12-32 | app/jobs/folio/mux/create_full_media_job.rb:12-31 | app/jobs/folio/mux/create_preview_media_job.rb:12-32 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 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 (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) app/jobs/folio/generate_missing_thumb_webp_job.rb:11 — app/jobs/folio/generate_missing_thumb_webp_job.rb:11-33 | app/jobs/folio/regenerate_thumb_webp_job.rb:11-33 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) app/models/concerns/folio/file/video/has_subtitles.rb:146 — app/models/concerns/folio/file/video/has_subtitles.rb:146-178 | app/models/concerns/folio/file/video/has_subtitles.rb:189-220 — 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, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) app/controllers/concerns/folio/console/default_actions.rb:189 — app/controllers/concerns/folio/console/default_actions.rb:189-202 | app/controllers/concerns/folio/console/default_actions.rb:206-219 | app/controllers/concerns/folio/console/default_actions.rb:223-236 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) app/mailers/folio/devise_mailer.rb:23 — app/mailers/folio/devise_mailer.rb:23-37 | app/mailers/folio/devise_mailer.rb:41-55 | app/mailers/folio/devise_mailer.rb:59-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) app/cells/folio/cookie_consent_cell.rb:243 — app/cells/folio/cookie_consent_cell.rb:243-251 | app/cells/folio/cookie_consent_cell.rb:255-261 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) app/components/folio/console/ui/ajax_input_component.rb:27 — app/components/folio/console/ui/ajax_input_component.rb:27-49 | app/components/folio/console/ui/button_component.rb:34-60 | app/components/folio/console/ui/image_component.rb:30-51 — 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 (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) app/controllers/concerns/folio/console/file_controller_base.rb:165 — app/controllers/concerns/folio/console/file_controller_base.rb:165-178 | app/models/folio/file.rb:574-585 — 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) app/cells/folio/image_cell.rb:211 — app/cells/folio/image_cell.rb:211-224 | app/components/folio/console/ui/image_component.rb:240-253 — 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, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) packs/ai/app/components/folio/ai/console/text_suggestions_group_component.rb:138 — packs/ai/app/components/folio/ai/console/text_suggestions_group_component.rb:138-145 | REDACTED:169-175 | packs/ai/app/overrides/lib/simple_form/inputs/base_ai_override.rb:78-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) app/models/concerns/folio/localized_per_site_singleton.rb:21 — app/models/concerns/folio/localized_per_site_singleton.rb:21-25 | app/models/concerns/folio/per_site_singleton.rb:25-29 | app/models/concerns/folio/singleton.rb:38-42 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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 (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:269 — app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:269-277 | REDACTED:129-137 — 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 · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) db/migrate/20171027131622_create_visits.rb:6 — db/migrate/20171027131622_create_visits.rb:6-61 | db/migrate/20210204114506_drop_unwanted_ahoy.rb:22-77 — before extracting anything, compare `db/migrate/20171027131622_create_visits.rb` and `db/migrate/20210204114506_drop_unwanted_ahoy.rb` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) app/controllers/folio/console/api/autocompletes_controller.rb:282 — app/controllers/folio/console/api/autocompletes_controller.rb:282-318 | app/controllers/folio/console/api/autocompletes_controller.rb:341-377 — 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, `app/controllers/folio/console/api/autocompletes_controller.rb:280` calls `try` and `app/controllers/folio/console/api/autocompletes_controller.rb:339` 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.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) app/services/folio/metadata/iptc_field_mapper.rb:706 — app/services/folio/metadata/iptc_field_mapper.rb:706-734 | app/services/folio/metadata/iptc_field_mapper.rb:822-850 — 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) app/lib/folio/tiptap/node_builder.rb:366 — app/lib/folio/tiptap/node_builder.rb:366-389 | app/lib/folio/tiptap/node_builder.rb:534-557 — 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.
D4 · Code Duplication · Duplicated block (32–33 lines × 2) · ×1
  • Duplicated block (32–33 lines × 2) REDACTED:306 — REDACTED:306-338 | REDACTED:342-373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) app/controllers/folio/console/api/autocompletes_controller.rb:42 — app/controllers/folio/console/api/autocompletes_controller.rb:42-58 | app/controllers/folio/console/api/autocompletes_controller.rb:161-177 | app/controllers/folio/console/api/autocompletes_controller.rb:300-316 | app/controllers/folio/console/api/autocompletes_controller.rb:359-375 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/controllers/folio/console/api/autocompletes_controller.rb:318` calls `filter_by_atom_setting_params` and `app/controllers/folio/console/api/autocompletes_controller.rb:60` 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 3) · ×1
  • Duplicated block (14–16 lines × 3) app/controllers/concerns/folio/http_cache/headers.rb:191 — app/controllers/concerns/folio/http_cache/headers.rb:191-206 | app/controllers/concerns/folio/http_cache/headers.rb:218-232 | app/controllers/concerns/folio/http_cache/headers.rb:257-270 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/controllers/concerns/folio/http_cache/headers.rb:213` calls `set_private_cache_headers_with_ttl` and `app/controllers/concerns/folio/http_cache/headers.rb:254` 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) app/controllers/folio/console/api/autocompletes_controller.rb:142 — app/controllers/folio/console/api/autocompletes_controller.rb:142-157 | app/controllers/folio/console/api/autocompletes_controller.rb:194-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) app/controllers/folio/console/api/autocompletes_controller.rb:159 — app/controllers/folio/console/api/autocompletes_controller.rb:159-170 | app/controllers/folio/console/api/autocompletes_controller.rb:211-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) app/controllers/folio/console/api/autocompletes_controller.rb:80 — app/controllers/folio/console/api/autocompletes_controller.rb:80-91 | app/controllers/folio/console/api/autocompletes_controller.rb:143-154 | app/controllers/folio/console/api/autocompletes_controller.rb:195-206 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:281 — app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:281-292 | REDACTED:164-175 — `app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (3–11 lines × 4) · ×1
  • Duplicated block (3–11 lines × 4) config/initializers/simple_form_bootstrap.rb:84 — config/initializers/simple_form_bootstrap.rb:84-86 | config/initializers/simple_form_folio.rb:9-19 | config/initializers/simple_form_folio.rb:27-37 | config/initializers/simple_form_folio.rb:44-54 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) lib/generators/folio/blog/blog_generator.rb:11 — lib/generators/folio/blog/blog_generator.rb:11-20 | lib/generators/folio/mailer/mailer_generator.rb:11-20 | lib/generators/folio/search/search_generator.rb:11-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) app/controllers/folio/console/api/autocompletes_controller.rb:80 — app/controllers/folio/console/api/autocompletes_controller.rb:80-87 | app/controllers/folio/console/api/autocompletes_controller.rb:143-150 | app/controllers/folio/console/api/autocompletes_controller.rb:195-202 | app/controllers/folio/console/api/autocompletes_controller.rb:282-289 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×1
  • Duplicated block (6 lines × 2) app/mailers/folio/devise_mailer.rb:41 — app/mailers/folio/devise_mailer.rb:41-46 | app/mailers/folio/devise_mailer.rb:60-65 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×1
  • Duplicated block (8 lines × 2) app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:245 — app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb:245-252 | REDACTED:105-112 — `app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
GD1 · Unfinished & placeholder code · Unfinished stub · ×1
  • Unfinished stub — raises a "not implemented" error app/lib/folio/mux/api.rb:66 — `update_file` is a shipped method whose whole body still raises a "not implemented" error, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×1
  • Unfinished stub — throws a "not implemented" exception app/lib/folio/mux/api.rb:66 — `update_file` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 395 plain JS — the untyped files are app/assets/config/folio_manifest.js, app/assets/javascripts/folio/add_params_to_url.js, app/assets/javascripts/folio/api.js, app/assets/javascripts/folio/atoms.js, app/assets/javascripts/folio/capitalize.js, app/assets/javascripts/folio/click_trigger.js (+389 more).
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (10 clone groups) app/assets/javascripts/folio/mermaid.js:44 — 10 duplicated blocks under app/ have copies in at least two of the sibling directories assets, cells, components — 2 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (5 clone groups) react/src/components/AtomForm/MultiAttachmentsSelect.js:81 — 5 duplicated blocks under react/src/ have copies in at least two of the sibling directories components, containers — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (5 clone groups) react/src/containers/AncestryApp/SerializedAncestry/index.js:3 — 5 duplicated blocks under react/src/containers/ have copies in at least two of the sibling directories AncestryApp, FileModal, FilesApp, IndexMode, MenuFormApp, OrderedMultiselectApp (+3 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (158 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (158 matched lines × 2 locations) app/components/folio/console/files/subtitle_form_component.js:11 — app/components/folio/console/files/subtitle_form_component.js:11 · REDACTED:14 — the two spans are one implementation copied and then locally edited — 920 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (94 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (94 matched lines × 2 locations) packs/ai/app/assets/javascripts/folio/ai/input.js:181 — packs/ai/app/assets/javascripts/folio/ai/input.js:181 · packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js:100 — the two spans are one implementation copied and then locally edited — 476 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) react/src/ducks/filePlacements.js:9 — react/src/ducks/filePlacements.js:9 · react/src/ducks/uploads.js:11 — the two spans are one implementation copied and then locally edited — 308 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) react/src/containers/AncestryApp/SerializedAncestry/index.js:3 — react/src/containers/AncestryApp/SerializedAncestry/index.js:3 · react/src/containers/MenuFormApp/SerializedMenu/index.js:28 — the two spans are one implementation copied and then locally edited — 221 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) react/src/ducks/fileModal.js:360 — react/src/ducks/fileModal.js:360 · react/src/ducks/fileModal.js:423 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×1
  • Duplicated block (29 lines × 2 locations) react/src/components/Select/index.js:118 — react/src/components/Select/index.js:118 · react/src/components/Select/index.js:185 — 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.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) app/components/folio/console/ui/index/filters_component.js:25 — app/components/folio/console/ui/index/filters_component.js:25 · app/components/folio/console/ui/index/header/query_form_component.js:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (23 matched lines × 2 locations) app/components/folio/console/links/modal/url_picker_component.js:56 — app/components/folio/console/links/modal/url_picker_component.js:56 · app/components/folio/console/links/modal_component.js:37 — the two spans are one implementation copied and then locally edited — 158 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (23 lines × 3 locations) · ×1
  • Duplicated block (23 lines × 3 locations) react/src/ducks/atoms.js:938 — react/src/ducks/atoms.js:938 · react/src/ducks/atoms.js:975 · react/src/ducks/atoms.js:1000 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (21 matched lines × 2 locations) app/assets/javascripts/folio/api.js:171 — app/assets/javascripts/folio/api.js:171 · app/assets/javascripts/folio/api.js:213 — the two spans are one implementation copied and then locally edited — 218 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (18 matched lines × 2 locations) app/components/folio/console/files/show_modal_component.js:91 — app/components/folio/console/files/show_modal_component.js:91 · app/components/folio/console/files/show_modal_component.js:176 — the two spans are one implementation copied and then locally edited — 87 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) app/components/folio/nested_fields_component.js:549 — app/components/folio/nested_fields_component.js:549 · app/components/folio/nested_fields_component.js:603 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (14 lines × 4 locations) · ×1
  • Duplicated block (14 lines × 4 locations) react/src/ducks/filePlacements.js:208 — react/src/ducks/filePlacements.js:208 · react/src/ducks/files.js:398 · react/src/ducks/files.js:414 · react/src/ducks/files.js:514 — the 4 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 (13 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (13 matched lines × 2 locations) app/components/folio/console/files/picker_component.js:188 — app/components/folio/console/files/picker_component.js:188 · app/components/folio/file_list/file_component.js:249 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (13 lines × 3 locations) · ×1
  • Duplicated block (13 lines × 3 locations) react/src/containers/FileModal/FileModalFile/index.js:277 — react/src/containers/FileModal/FileModalFile/index.js:277 · react/src/containers/FileModal/FileModalFile/index.js:291 · react/src/containers/FileModal/FileModalFile/index.js:305 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 55, cognitive 54) · ×1
  • Complex function (anonymous) (cyclomatic 55, cognitive 54) react/src/components/ReadOnlyMetadataDisplay/index.js:3 — (anonymous) has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function modalReducer (cyclomatic 40, cognitive 45) · ×1
  • Complex function modalReducer (cyclomatic 40, cognitive 45) react/src/ducks/fileModal.js:263 — modalReducer has cyclomatic complexity 40 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadOptions (cyclomatic 37, cognitive 44) · ×1
  • Complex function loadOptions (cyclomatic 37, cognitive 44) react/src/components/Select/index.js:172 — loadOptions has cyclomatic complexity 37 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function atomsReducer (cyclomatic 31, cognitive 9) · ×1
  • Complex function atomsReducer (cyclomatic 31, cognitive 9) react/src/ducks/atoms.js:484 — atomsReducer has cyclomatic complexity 31 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 23) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 23) react/src/containers/FileModal/FileModalFile/index.js:27 — (anonymous) has cyclomatic complexity 28 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function performAutoScroll (cyclomatic 24, cognitive 36) · ×1
  • Complex function performAutoScroll (cyclomatic 24, cognitive 36) app/components/folio/nested_fields_component.js:532 — performAutoScroll has cyclomatic complexity 24 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FileTableRow (cyclomatic 21, cognitive 21) · ×1
  • Complex function FileTableRow (cyclomatic 21, cognitive 21) react/src/components/FileList/FileTableList/FileTableRow/index.js:11 — FileTableRow has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function filesReducer (cyclomatic 21, cognitive 16) · ×1
  • Complex function filesReducer (cyclomatic 21, cognitive 16) react/src/ducks/files.js:325 — filesReducer has cyclomatic complexity 21 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createEmbedElement (cyclomatic 20, cognitive 28) · ×1
  • Complex function createEmbedElement (cyclomatic 20, cognitive 28) data/embed/source/embed.js:98 — createEmbedElement has cyclomatic complexity 20 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.
R2 · Cyclomatic Complexity · Complex function renderMetadataRow (cyclomatic 20, cognitive 19) · ×1
  • Complex function renderMetadataRow (cyclomatic 20, cognitive 19) react/src/components/ReadOnlyMetadataDisplay/index.js:88 — renderMetadataRow has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function queueAutosaveIfPossible (cyclomatic 19, cognitive 22) · ×1
  • Complex function queueAutosaveIfPossible (cyclomatic 19, cognitive 22) app/components/folio/console/form/footer_component.js:85 — queueAutosaveIfPossible has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fillFromParent (cyclomatic 18, cognitive 35) · ×1
  • Complex function fillFromParent (cyclomatic 18, cognitive 35) app/components/folio/console/file_placements/multi_picker_fields/placement_component.js:28 — fillFromParent has cyclomatic complexity 18 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function init (cyclomatic 18, cognitive 20) · ×1
  • Complex function init (cyclomatic 18, cognitive 20) app/components/folio/uppy_component.js:68 — init has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 17) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 17) react/src/components/AtomForm/index.js:245 — (anonymous) 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.
R2 · Cyclomatic Complexity · Complex function run (cyclomatic 17, cognitive 29) · ×1
  • Complex function run (cyclomatic 17, cognitive 29) app/assets/javascripts/folio/remote_scripts.js:125 — run has cyclomatic complexity 17 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function batchAction (cyclomatic 17, cognitive 25) · ×1
  • Complex function batchAction (cyclomatic 17, cognitive 25) app/components/folio/console/files/batch/bar_component.js:127 — batchAction has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function AtomInput (cyclomatic 17, cognitive 21) · ×1
  • Complex function AtomInput (cyclomatic 17, cognitive 21) react/src/components/AtomForm/AtomInput.js:37 — AtomInput has cyclomatic complexity 17 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 26) · ×1
  • Complex function (anonymous) (cyclomatic 16, cognitive 26) react/src/utils/settingsToHash.js:12 — (anonymous) has cyclomatic complexity 16 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 16, cognitive 23) · ×1
  • Complex function render (cyclomatic 16, cognitive 23) react/src/components/Select/index.js:86 — render has cyclomatic complexity 16 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.
R2 · Cyclomatic Complexity · Complex function PaginationComponent (cyclomatic 16, cognitive 19) · ×1
  • Complex function PaginationComponent (cyclomatic 16, cognitive 19) REDACTED:24 — PaginationComponent has cyclomatic complexity 16 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.
R2 · Cyclomatic Complexity · Complex function open (cyclomatic 15, cognitive 31) · ×1
  • Complex function open (cyclomatic 15, cognitive 31) app/components/folio/console/ui/notification_modal_component.js:67 — open has cyclomatic complexity 15 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onKeydown (cyclomatic 14, cognitive 25) · ×1
  • Complex function onKeydown (cyclomatic 14, cognitive 25) test/dummy/app/components/dummy/ui/menu_toolbar/header_search_component.js:113 — onKeydown has cyclomatic complexity 14 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 14, cognitive 20) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 20) app/assets/javascripts/folio/s3_upload.js:219 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function insertCharacter (cyclomatic 14, cognitive 16) · ×1
  • Complex function insertCharacter (cyclomatic 14, cognitive 16) app/components/folio/special_characters/popup_component.js:110 — insertCharacter 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.
R2 · Cyclomatic Complexity · Complex function sendStartMessage (cyclomatic 14, cognitive 15) · ×1
  • Complex function sendStartMessage (cyclomatic 14, cognitive 15) app/assets/javascripts/folio/input/tiptap.js:211 — sendStartMessage has cyclomatic complexity 14 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.
R2 · Cyclomatic Complexity · Complex function handleResponse (cyclomatic 13, cognitive 22) · ×1
  • Complex function handleResponse (cyclomatic 13, cognitive 22) app/components/folio/console/form_modal_component.js:58 — handleResponse has cyclomatic complexity 13 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 18) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 18) react/src/containers/FileModal/index.js:122 — (anonymous) has cyclomatic complexity 13 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.
R2 · Cyclomatic Complexity · Complex function handleOverflow (cyclomatic 13, cognitive 18) · ×1
  • Complex function handleOverflow (cyclomatic 13, cognitive 18) test/dummy/app/components/dummy/ui/menu_component.js:33 — handleOverflow has cyclomatic complexity 13 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.
R2 · Cyclomatic Complexity · Complex function onMessage (cyclomatic 13, cognitive 15) · ×1
  • Complex function onMessage (cyclomatic 13, cognitive 15) app/components/folio/console/files/batch/bar_component.js:258 — onMessage 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 14) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 14) app/cells/folio/console/index/position_buttons/_regular.js:175 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function innerBind (cyclomatic 13, cognitive 13) · ×1
  • Complex function innerBind (cyclomatic 13, cognitive 13) app/components/folio/player_component.js:155 — innerBind has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function updateAtomPreviews (cyclomatic 13, cognitive 13) · ×1
  • Complex function updateAtomPreviews (cyclomatic 13, cognitive 13) react/src/ducks/atoms.js:268 — updateAtomPreviews has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAutocompleteActive (cyclomatic 12, cognitive 18) · ×1
  • Complex function handleAutocompleteActive (cyclomatic 12, cognitive 18) app/assets/javascripts/folio/input/autocomplete.js:162 — handleAutocompleteActive has cyclomatic complexity 12 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.
R2 · Cyclomatic Complexity · Complex function submit (cyclomatic 12, cognitive 18) · ×1
  • Complex function submit (cyclomatic 12, cognitive 18) app/components/folio/console/ui/index/filters_component.js:10 — submit has cyclomatic complexity 12 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.
R2 · Cyclomatic Complexity · Complex function reactSelectOptionToRecord (cyclomatic 12, cognitive 12) · ×1
  • Complex function reactSelectOptionToRecord (cyclomatic 12, cognitive 12) react/src/components/AtomForm/Associations.js:15 — reactSelectOptionToRecord 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.
R2 · Cyclomatic Complexity · Complex function shouldAbortBasedOnElement (cyclomatic 12, cognitive 11) · ×1
  • Complex function shouldAbortBasedOnElement (cyclomatic 12, cognitive 11) app/components/folio/console/form/footer_component.js:237 — shouldAbortBasedOnElement has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FileThumbnail (cyclomatic 12, cognitive 11) · ×1
  • Complex function FileThumbnail (cyclomatic 12, cognitive 11) react/src/components/FileList/FileThumbnailList/FileThumbnail/index.js:9 — FileThumbnail has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SerializedMenuItem (cyclomatic 12, cognitive 11) · ×1
  • Complex function SerializedMenuItem (cyclomatic 12, cognitive 11) react/src/containers/MenuFormApp/SerializedMenu/index.js:3 — SerializedMenuItem has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function shouldHideOnChange (cyclomatic 12, cognitive 10) · ×1
  • Complex function shouldHideOnChange (cyclomatic 12, cognitive 10) app/assets/javascripts/folio/input/date_time.js:229 — shouldHideOnChange has cyclomatic complexity 12 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.
R2 · Cyclomatic Complexity · Complex function componentDidUpdate (cyclomatic 12, cognitive 10) · ×1
  • Complex function componentDidUpdate (cyclomatic 12, cognitive 10) react/src/containers/FileModal/index.js:78 — componentDidUpdate has cyclomatic complexity 12 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 · react/src/ducks/atoms.js · ×1
  • react/src/ducks/atoms.js: 982 lines of code react/src/ducks/atoms.js:1 — react/src/ducks/atoms.js has 982 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 · app/components/folio/uppy_component.js · ×1
  • app/components/folio/uppy_component.js: 570 lines of code app/components/folio/uppy_component.js:1 — app/components/folio/uppy_component.js 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 · app/components/folio/nested_fields_component.js · ×1
  • app/components/folio/nested_fields_component.js: 545 lines of code app/components/folio/nested_fields_component.js:1 — app/components/folio/nested_fields_component.js has 545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · app/components/folio/console/files/show/thumbnails/crop_edit_component.js · ×1
  • app/components/folio/console/files/show/thumbnails/crop_edit_component.js: 522 lines of code app/components/folio/console/files/show/thumbnails/crop_edit_component.js:1 — app/components/folio/console/files/show/thumbnails/crop_edit_component.js has 522 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 · react/src/containers/FileModal/FileModalFile/index.js · ×1
  • react/src/containers/FileModal/FileModalFile/index.js: 471 lines of code react/src/containers/FileModal/FileModalFile/index.js:1 — react/src/containers/FileModal/FileModalFile/index.js has 471 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 · react/src/ducks/files.js · ×1
  • react/src/ducks/files.js: 464 lines of code react/src/ducks/files.js:1 — react/src/ducks/files.js has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · app/assets/javascripts/folio/console/atoms/previews/base.js · ×1
  • app/assets/javascripts/folio/console/atoms/previews/base.js: 419 lines of code app/assets/javascripts/folio/console/atoms/previews/base.js:1 — app/assets/javascripts/folio/console/atoms/previews/base.js has 419 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint or typecheck script · ×1
  • No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~694 LoC) · ×1
  • Dead file (~694 LoC) app/components/folio/nested_fields_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~659 LoC) · ×1
  • Dead file (~659 LoC) app/components/folio/console/files/show/thumbnails/crop_edit_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~638 LoC) · ×1
  • Dead file (~638 LoC) app/components/folio/uppy_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~417 LoC) · ×1
  • Dead file (~417 LoC) app/components/folio/console/form/footer_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~369 LoC) · ×1
  • Dead file (~369 LoC) REDACTED — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~347 LoC) · ×1
  • Dead file (~347 LoC) app/components/folio/player_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~343 LoC) · ×1
  • Dead file (~343 LoC) app/components/folio/console/files/batch/bar_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~341 LoC) · ×1
  • Dead file (~341 LoC) app/components/folio/console/private_attachments_fields_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~331 LoC) · ×1
  • Dead file (~331 LoC) app/components/folio/file_list/file_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~302 LoC) · ×1
  • Dead file (~302 LoC) app/components/folio/console/ui/ajax_input_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~253 LoC) · ×1
  • Dead file (~253 LoC) app/components/folio/console/files/picker_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~218 LoC) · ×1
  • Dead file (~218 LoC) app/cells/folio/console/index/position_buttons/_regular.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~211 LoC) · ×1
  • Dead file (~211 LoC) app/components/folio/special_characters/popup_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~199 LoC) · ×1
  • Dead file (~199 LoC) app/components/folio/console/tiptap/simple_form_wrap_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~197 LoC) · ×1
  • Dead file (~197 LoC) app/components/folio/console/links/modal/url_picker_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~194 LoC) · ×1
  • Dead file (~194 LoC) app/components/folio/console/files/show_modal_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~192 LoC) · ×1
  • Dead file (~192 LoC) app/components/folio/console/files/show_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~149 LoC) · ×1
  • Dead file (~149 LoC) app/components/folio/console/ui/notification_modal_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~136 LoC) · ×1
  • Dead file (~136 LoC) app/components/folio/console/tiptap/overlay_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~131 LoC) · ×1
  • Dead file (~131 LoC) app/components/folio/console/form_modal_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~128 LoC) · ×1
  • Dead file (~128 LoC) REDACTED — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~124 LoC) · ×1
  • Dead file (~124 LoC) app/components/folio/dropzone_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~119 LoC) · ×1
  • Dead file (~119 LoC) app/components/folio/console/file_placements/multi_picker_fields/placement_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~118 LoC) · ×1
  • Dead file (~118 LoC) app/components/folio/console/aasm/email_modal_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~117 LoC) · ×1
  • Dead file (~117 LoC) react/src/registerServiceWorker.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~116 LoC) · ×1
  • Dead file (~116 LoC) app/components/folio/console/links/modal_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~114 LoC) · ×1
  • Dead file (~114 LoC) app/cells/folio/console/report/report.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~110 LoC) · ×1
  • Dead file (~110 LoC) app/components/folio/captcha/turnstile_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~108 LoC) · ×1
  • Dead file (~108 LoC) app/components/folio/console/ui/alert_component.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~101 LoC) · ×1
  • Dead file (~101 LoC) app/cells/folio/console/tagsinput/tagsinput.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~98 LoC) · ×1
  • Dead file (~98 LoC) app/cells/folio/console/index/position_buttons/_sortable.js — no import path from any entry point (88 application, 1 tooling, 41 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'react-dropzone-component' · ×1
  • Unused dependency 'react-dropzone-component' react/package.json:11 — Declared in react/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.
R8 · Dependency Hygiene · Unused dependency 'react-scripts' · ×1
  • Unused dependency 'react-scripts' react/package.json:14 — Declared in react/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.
R8 · Dependency Hygiene · Unused dependency 'svg-sprite' · ×1
  • Unused dependency 'svg-sprite' test/dummy/package.json:6 — Declared in test/dummy/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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-highlight' · ×1
  • Unused dependency '@tiptap/extension-highlight' tiptap/package.json:23 — Declared in tiptap/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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-unique-id' · ×1
  • Unused dependency '@tiptap/extension-unique-id' tiptap/package.json:29 — Declared in tiptap/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.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity app/views/layouts/folio/_recaptcha.slim:2 — `https://www.google.com/recaptcha/api.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked vendor/assets/bower_components/tom-select/package.json:33 — vendor/assets/bower_components/tom-select/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / REDACTED / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap app/lib/folio/tiptap/content.rb:158 — `convert_and_sanitize_value` is public, takes a document from its caller (line 8) and hands it to `traverse_and_scrub`, which walks `data` as a `Hash` and calls itself at line 158 (`self.traverse_and_scrub`) with a piece of `data` (and at line 160) — and nowhere in `traverse_and_scrub` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `traverse_and_scrub` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Minor — 73 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate app/components/folio/nested_fields_component.js:581 — `!cachedRect || rectCacheFrame === 0 || cachedRectWindowWidth !== currentWidth || cachedRectWindowHeight !== currentHeight` appears character-identically in 2 files — app/components/folio/nested_fields_component.js, tiptap/src/hooks/use-drag-auto-scroll.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 app/cells/folio/console/file/preview_reloader/preview_reloader.js:6 — `!data || data.type !== 'Folio::ApplicationJob/file_update'` appears character-identically in 2 files — app/cells/folio/console/file/preview_reloader/preview_reloader.js, app/cells/folio/console/file/processing_notifier/processing_notifier.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx:278 — `!e.defaultPrevented && !isDisabled && editor` appears character-identically in 2 files — tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx, tiptap/src/components/tiptap-ui/mark-button/mark-button.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/components/folio/console/ui/ajax_input_component.js:283 — `!e.detail || typeof e.detail.value !== 'string'` appears character-identically in 2 files — app/components/folio/console/ui/ajax_input_component.js, app/components/folio/console/ui/in_place_input_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-ui/blockquote-button/blockquote-button.tsx:168 — `!shouldShow || !editor || !editor.isEditable` appears character-identically in 4 files — tiptap/src/components/tiptap-ui/blockquote-button/blockquote-button.tsx, tiptap/src/components/tiptap-ui/code-block-button/code-block-button.tsx, tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx, tiptap/src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/components/folio/nested_fields_component.js:572 — `(scrollDelta < 0 && currentScroll > 0) || (scrollDelta > 0 && currentScroll < maxScroll)` appears character-identically in 2 files — app/components/folio/nested_fields_component.js, tiptap/src/hooks/use-drag-auto-scroll.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 react/src/ducks/filePlacements.js:128 — `action.fileType && !state[action.fileType]` appears character-identically in 4 files — react/src/ducks/filePlacements.js, react/src/ducks/files.js, react/src/ducks/filters.js, react/src/ducks/uploads.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx:187 — `asChild && React.isValidElement(children)` appears character-identically in 3 files — tiptap/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx, tiptap/src/components/tiptap-ui-primitive/popover/popover.tsx, tiptap/src/components/tiptap-ui-primitive/tooltip/tooltip.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-editors/folio-editor/folio-editor-toolbar-command-button.tsx:26 — `command.title[ document.documentElement.lang as keyof typeof command.title ] || command.title.en` appears character-identically in 2 files — tiptap/src/components/tiptap-editors/folio-editor/folio-editor-toolbar-command-button.tsx, tiptap/src/components/tiptap-editors/folio-editor/folio-editor-toolbar-dropdown.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/assets/javascripts/folio/modal.js:93 — `e.target && (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable)` appears character-identically in 2 files — app/assets/javascripts/folio/modal.js, app/components/folio/console/files/show_modal_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate react/src/components/FileList/FileTableList/FileTableRow/index.js:67 — `file.attributes.thumb || file.attributes.dataThumbnail` appears character-identically in 3 files — react/src/components/FileList/FileTableList/FileTableRow/index.js, react/src/components/FileList/FileThumbnailList/FileThumbnail/index.js, react/src/components/Picture/index.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-ui/blockquote-button/blockquote-button.tsx:77 — `isNodeSelection(editor.state.selection) || !canToggle` appears character-identically in 2 files — tiptap/src/components/tiptap-ui/blockquote-button/blockquote-button.tsx, tiptap/src/components/tiptap-ui/code-block-button/code-block-button.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx:200 — `isNodeSelection(editor.state.selection) || !canToggleHighlight(editor)` appears character-identically in 2 files — tiptap/src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx, tiptap/src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/assets/javascripts/folio/i18n.js:4 — `map[document.documentElement.lang] || map.en` appears character-identically in 2 files — app/assets/javascripts/folio/i18n.js, tiptap/src/lib/i18n.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 react/src/components/Select/index.js:83 — `minimumInputLength && inputValue.length > 0 && inputValue.length < minimumInputLength` appears character-identically in 2 files — react/src/components/Select/index.js, react/src/components/Select/makeNoOptionsMessage.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-extensions/folio-tiptap-node/add-unique-ids-to-folio-tiptap-nodes.tsx:18 — `newNode.content && Array.isArray(newNode.content)` appears character-identically in 2 files — tiptap/src/components/tiptap-extensions/folio-tiptap-node/add-unique-ids-to-folio-tiptap-nodes.tsx, tiptap/src/components/tiptap-extensions/folio-tiptap-node/remove-unique-ids-from-folio-tiptap-nodes.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tiptap/src/components/tiptap-extensions/folio-tiptap-node/folio-tiptap-node-paste-placeholder.tsx:37 — `process.env.NODE_ENV === "production" && event.origin !== window.origin` appears character-identically in 4 files — tiptap/src/components/tiptap-extensions/folio-tiptap-node/folio-tiptap-node-paste-placeholder.tsx, tiptap/src/components/tiptap-extensions/folio-tiptap-node/folio-tiptap-node.tsx, tiptap/src/components/tiptap-ui/folio-tiptap-node-button/folio-tiptap-node-button.tsx, tiptap/src/components/tiptap-ui/link-popover/link-popover.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/components/folio/nested_fields_component.js:600 — `relativeY >= scrollSensitivity && relativeY <= containerHeight - scrollSensitivity` appears character-identically in 2 files — app/components/folio/nested_fields_component.js, tiptap/src/hooks/use-drag-auto-scroll.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 app/assets/javascripts/folio/input/tiptap.js:441 — `this.attributeNameValue || 'tiptap_content'` appears character-identically in 2 files — app/assets/javascripts/folio/input/tiptap.js, app/components/folio/console/tiptap/simple_form_wrap/autosave_info_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/components/folio/console/files/show/encoding_info_component.js:17 — `this.messageBusCallbackKey && window.Folio.MessageBus.callbacks` appears character-identically in 3 files — app/components/folio/console/files/show/encoding_info_component.js, app/components/folio/console/files/subtitle_form_component.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/assets/javascripts/folio/input/tiptap.js:105 — `this.originValue !== '*' && e.origin !== window.origin` appears character-identically in 2 files — app/assets/javascripts/folio/input/tiptap.js, app/components/folio/console/tiptap/overlay_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/assets/javascripts/folio/input/autocomplete.js:352 — `to && typeof from !== 'undefined' && to !== from` appears character-identically in 2 files — app/assets/javascripts/folio/input/autocomplete.js, app/components/folio/console/ui/in_place_input_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/assets/javascripts/folio/api.js:145 — `typeof response === 'object' && response.meta && response.meta.flash` appears character-identically in 2 files — app/assets/javascripts/folio/api.js, app/components/folio/console/ui/flash_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/components/folio/console/files/picker_component.js:243 — `window.Folio && window.Folio.MessageBus && window.Folio.MessageBus.callbacks` appears character-identically in 6 files — app/components/folio/console/files/picker_component.js, app/components/folio/console/files/show_component.js, app/components/folio/console/private_attachments_fields_component.js, app/components/folio/console/ui/flash_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packs/ai/app/assets/javascripts/folio/ai/input.js:424 — `window.Folio?.Stimulus?.register && window.Stimulus?.Controller` appears character-identically in 3 files — packs/ai/app/assets/javascripts/folio/ai/input.js, packs/ai/app/components/folio/ai/console/text_suggestions_component.js, packs/ai/app/components/folio/ai/console/text_suggestions_group_component.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×6
  • redundant comment app/assets/javascripts/folio/thumbnails.js:99 — "Check if any of the element's thumbnail data matches this response" repeats the code it sits on: 5 of its 6 words (check, element, thumbnail, data, matches) are already in `const matchingData = elementData.find(data =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment app/assets/javascripts/folio/thumbnails.js:105 — "Dispatch event to the element with the new thumbnail data" repeats the code it sits on: 5 of its 6 words (dispatch, event, element, new, thumbnail) are already in `element.dispatchEvent(new CustomEvent(window.Folio.Thumbnails.EVENT_NAME, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment app/assets/javascripts/folio/thumbnails.js:268 — "Remove event listener" repeats the code it sits on: 3 of its 3 words (remove, event, listener) are already in `this.element.removeEventListener(window.Folio.Thumbnails.EVENT_NAME, this.handleNewData)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:54 — "Check if error has responseData with meta.validation_box_html" repeats the code it sits on: 8 of its 8 words (check, error, response, data, meta, validation, box, html) are already in `if (error.responseData && error.responseData.meta && error.responseData.meta.validation_box_html)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment app/components/folio/console/files/subtitle_form_component.js:139 — "For new subtitles, just remove them" repeats the code it sits on: 3 of its 3 words (new, subtitles, remove) are already in `this.removeNewSubtitle(e)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment react/src/components/Select/index.js:183 — "Calculate page from loadedOptions length" repeats the code it sits on: 4 of its 5 words (page, loaded, options, length) are already in `const page = Math.floor(loadedOptions.length / AUTOCOMPLETE_PAGY_ITEMS) + 1`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D30 · Dependency Vulnerabilities · Low CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Disabled test · ×4
  • Disabled test test/cells/folio/console/users/header_actions_cell_test.rb:9 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test test/cells/folio/console/users/invite_and_copy_cell_test.rb:7 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test test/controllers/folio/users/passwords_controller_test.rb:16 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test test/integration/folio/console/users_test.rb:48 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion package.json:1 — `(repository root)` (63502 LoC, 1176 module-visible types across 276 directories) overshoots its size bounds. 2 of 2 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion react/package.json:1 — `react` (10350 LoC, 125 module-visible types across 80 directories) overshoots its size bounds. 2 of 2 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×2
  • Placeholder literal left in code app/cells/folio/ui_cell.rb:118 — A placeholder string ("<p>Lorem ipsum dolor sit amet, consectet…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code REDACTED:108 — A placeholder string ("<p>Lorem ipsum dolor sit amet, consectet…") is still in shipped code — typical of generated boilerplate that was never filled in.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×2
  • Silent fallback default on parse failure packs/ai/app/lib/folio/ai/providers/dummy.rb:69 — `prompt_data` answers `{}` when `ParserError` 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 rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure REDACTED:269 — `raw_fields` answers `[]` when `ParserError` 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 rescue or above the method, and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch data/embed/source/embed.js:19 — `relativeLuminance` swallows every exception into `return 1` — 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 react/src/components/AtomForm/OrderedMultiselectInput.js:10 — `parseValues` 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.
D10 · Test Quality · Mock-dominated test · ×1
  • Mock-dominated test: explains an exhausted limit for %s react/src/containers/Atoms/tests/AtomsInsertion.test.js:53 — This test sets up 3 test doubles (for example `jest.spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: app/lib/folio/tiptap/node_builder.rb, REDACTED, app/controllers/concerns/folio/console/default_actions.rb, app/components/folio/tiptap/content/prose_mirror_node_component.rb, REDACTED, app/models/folio/tiptap/node.rb, app/lib/folio/tiptap/content.rb, app/overrides/lib/simple_form/inputs/collection_select_input_override.rb (+3 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (12 single-owned of 198 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 198 of the 832 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: app/jobs/folio/eleven_labs/transcribe_subtitles_job.rb.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found bin/rails:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `bin/rails` makes this repository a deployable product (line 1).
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch bundler/gitsubmodule · ×1
  • Dependabot does not watch bundler/gitsubmodule vendor/assets/bower_components/tom-select/.github/dependabot.yml:7 — `vendor/assets/bower_components/tom-select/.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `bundler`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
X5 · Nullable reference types · Ruby's type checker does not check nil everywhere · ×1
  • Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 832 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
Minor — 57 finding(s)
D12 · Dependency Hygiene · Outdated · ×57
  • Outdated: aasm — `aasm` is resolved to 5.5.2 in the committed REDACTED but 6.0.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update aasm` and commit the updated REDACTED.
  • Outdated: ancestry — `ancestry` is resolved to 4.3.3 in the committed REDACTED but 5.1.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update ancestry` and commit the updated REDACTED.
  • Outdated: aws-sdk-s3 — `aws-sdk-s3` is resolved to 1.208.0 in the committed REDACTED but 1.242.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update aws-sdk-s3` and commit the updated REDACTED.
  • Outdated: binding_of_caller — `binding_of_caller` is resolved to 1.0.1 in the committed REDACTED but 2.0.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update binding_of_caller` and commit the updated REDACTED.
  • Outdated: cancancan — `cancancan` is resolved to 3.6.1 in the committed REDACTED but 3.7.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update cancancan` and commit the updated REDACTED.
  • Outdated: cells-slim — `cells-slim` is resolved to 0.0.6 in the committed REDACTED but 0.1.1 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update cells-slim` and commit the updated REDACTED.
  • Outdated: countries — `countries` is resolved to 8.0.4 in the committed REDACTED but 8.1.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update countries` and commit the updated REDACTED.
  • Outdated: deepl-rb — `deepl-rb` is resolved to 3.3.0 in the committed REDACTED but 3.10.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update deepl-rb` and commit the updated REDACTED.
  • Outdated: devise — `devise` is resolved to 4.9.4 in the committed REDACTED but 5.0.4 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update devise` and commit the updated REDACTED.
  • Outdated: devise-i18n — `devise-i18n` is resolved to 1.15.0 in the committed REDACTED but 1.16.1 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update devise-i18n` and commit the updated REDACTED.
  • Outdated: devise_invitable — `devise_invitable` is resolved to 2.0.11 in the committed REDACTED but 3.1.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update devise_invitable` and commit the updated REDACTED.
  • Outdated: dotenv-rails — `dotenv-rails` is resolved to 3.1.8 in the committed REDACTED but 3.2.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update dotenv-rails` and commit the updated REDACTED.
  • Outdated: dragonfly — `dragonfly` is resolved to 1.4.1 in the committed REDACTED but 1.4.2 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update dragonfly` and commit the updated REDACTED.
  • Outdated: factory_bot — `factory_bot` is resolved to 6.5.6 in the committed REDACTED but 6.6.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update factory_bot` and commit the updated REDACTED.
  • Outdated: faker — `faker` is resolved to 3.5.2 in the committed REDACTED but 3.8.0 is the current release on rubygems.org, and Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update faker` and commit the updated REDACTED.
  • Outdated: friendly_id — `friendly_id` is resolved to 5.5.1 in the committed REDACTED but 5.7.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update friendly_id` and commit the updated REDACTED.
  • Outdated: gibbon — `gibbon` is resolved to 3.5.0 in the committed REDACTED but 4.1.1 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update gibbon` and commit the updated REDACTED.
  • Outdated: guard-slimlint — `guard-slimlint` is resolved to 1.3.2 in the committed REDACTED but 2.1.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update guard-slimlint` and commit the updated REDACTED.
  • Outdated: i18n-tasks — `i18n-tasks` is resolved to 1.0.15 in the committed REDACTED but 1.2.1 is the current release on rubygems.org, and Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update i18n-tasks` and commit the updated REDACTED.
  • Outdated: jwt — `jwt` is resolved to 3.1.2 in the committed REDACTED but 3.3.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update jwt` and commit the updated REDACTED.
  • Outdated: message_bus — `message_bus` is resolved to 4.4.1 in the committed REDACTED but 5.0.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update message_bus` and commit the updated REDACTED.
  • Outdated: minitest — `minitest` is resolved to 5.26.0 in the committed REDACTED but 6.1.0 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update minitest` and commit the updated REDACTED.
  • Outdated: net-sftp — `net-sftp` is resolved to 4.0.0 in the committed REDACTED but 4.1.1 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update net-sftp` and commit the updated REDACTED.
  • Outdated: nokogiri — `nokogiri` is resolved to 1.19.2-arm64-darwin in the committed REDACTED but 1.19.7 is the current release on rubygems.org, and folio.gemspec declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update nokogiri` and commit the updated REDACTED.
  • Outdated: omniauth — `omniauth` is resolved to 2.1.4 in the committed REDACTED but 2.4.1 is the current release on rubygems.org, and Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update omniauth` and commit the updated REDACTED.
  • + 32 more in this group — see findings.md.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-78bc26d1b3884a13862cd7deb609a01f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-78bc26d1b3884a13862cd7deb609a01f/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-78bc26d1b3884a13862cd7deb609a01f/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=2578" --report-format json --report-path /tmp/watchdog-gitleaks-78bc26d1b3884a13862cd7deb609a01f/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-78bc26d1b3884a13862cd7deb609a01f/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude node_modules/@popperjs --exclude node_modules/folio-bootstrap-5/dist --exclude tiptap --exclude vendor/assets/bower_components/autosize --exclude vendor/assets/bower_components/clipboard .61artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .124artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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 1 file(s) — `app/assets/javascripts/folio/console/react.js` — so the PII/GDPR sweep did not cover them at all.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e631-8387-77d3-a88a-fdb507224fcb · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md