Public report of MashiroKai/Nebflow, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 16:46 UTC · Survey ID cd_ee15e0e671ce4f718b9b77299f191993
MashiroKai/Nebflow
Measured 16 November 2026, 16:43 UTC, at code version d75d72d
First survey, so nothing to compare with yet
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 261,079 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 2.9 person-years · Weakest lens: Code Health, 23.9
Findings by how serious they are
194 critical3284 serious178 minor
11 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 16:43 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
82of 82 dimensions measured by tools.
3623of 3656 findings point to an exact file and line, so you can open each one in the code. The other 33 concern the repository as a whole, such as missing documentation.
82dimensions across 7 lenses, read from 261,079 lines of product code in 4 projects.
MashiroKai/Nebflow falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 35.2 out of 100 and is rated Weak, and 99 of its 194 critical findings are security problems.
Code Health, at 23.9, is the weakest lens and counts most in the score. The best first step is replacing the weak hashes, worth about 5.0 points. Adding type checking would lift Code Health itself, worth about 3.7 points. Raising Code Health to 70 would lift the score to about 44.8.
Seventy-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Fifteen pipeline steps run downloads nobody checks, and thirty-eight controls can't be used without a mouse. Pinning each tool to an exact version, checking each download against a checksum and making the controls work with a keyboard would close these risks. The four unsafe settings in infrastructure or container files need changing to safe values. The three passwords or keys in the code need replacing, with the old ones switched off. The 20 buttons or links with no name need a name, even when they only show an icon.
The product code is 261,079 lines, about €420,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 23.9 to 70, the lowest score rated Strong, the score would rise from 35.2 to about 44.8.
Code composition: what the lines of code are
Product code 53%Tests 47%
Rebuild cost: about €420,000 · Estimate
Cost to rebuild
€140,000 to €700,000, for 2,327 to 7,382 hours of work, about 2.9 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 35. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 261,079 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
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.
Raises the score by about 3.7 points · Medium effort · Type Safety
3
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 3.6 points · Medium effort · Large Files
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 €420,000 to build again, about 2.9 person-years of work. Its weakest lens is Code Health, at 23.9 (Critical). 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
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. Of all the actions in this report, it raises the score most for the work it takes: about 5.0 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 4.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 1,903,956 lines over the last 90 days, which is about 7,721,599 lines a year. At that pace, the extra work comes to an estimated 1566.8 to 9400.7 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.
488 modules, with 266 dependencies between them. 2 loops run through 14 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 448 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.
46 pairs of types, where a type in actor.AgentCommand uses a type in actor. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
actor.InteractionReply uses shared, so a change to shared can break actor.InteractionReply, while a change to actor.InteractionReply can't break shared.
Position
Below the diagonal: actor.InteractionReply uses a module listed above it, which is the healthy direction.
core.delegate.MergeQueue uses actor, so a change to actor can break core.delegate.MergeQueue, while a change to core.delegate.MergeQueue can't break actor.
Position
Below the diagonal: core.delegate.MergeQueue uses a module listed above it, which is the healthy direction.
agent.AgentActor uses actor.AgentCommand, so a change to actor.AgentCommand can break agent.AgentActor, while a change to agent.AgentActor can't break actor.AgentCommand.
Position
Below the diagonal: agent.AgentActor uses a module listed above it, which is the healthy direction.
core.tools uses llm.imagegen.ImageGenTypes, so a change to llm.imagegen.ImageGenTypes can break core.tools, while a change to core.tools can't break llm.imagegen.ImageGenTypes.
Position
Below the diagonal: core.tools uses a module listed above it, which is the healthy direction.
core.AskUserAnswerPort uses shared, so a change to shared can break core.AskUserAnswerPort, while a change to core.AskUserAnswerPort can't break shared.
Position
Below the diagonal: core.AskUserAnswerPort uses a module listed above it, which is the healthy direction.
core.AskUserAnswerPort uses core.tools, so a change to core.tools can break core.AskUserAnswerPort, while a change to core.AskUserAnswerPort can't break core.tools.
Position
Below the diagonal: core.AskUserAnswerPort uses a module listed above it, which is the healthy direction.
core.FriendRosterPort uses core.tools, so a change to core.tools can break core.FriendRosterPort, while a change to core.FriendRosterPort can't break core.tools.
Position
Below the diagonal: core.FriendRosterPort uses a module listed above it, which is the healthy direction.
core.flow.TreeCommand uses core.entity, so a change to core.entity can break core.flow.TreeCommand, while a change to core.flow.TreeCommand can't break core.entity.
Position
Below the diagonal: core.flow.TreeCommand uses a module listed above it, which is the healthy direction.
core.flow.TreeCommand uses core.flow, so a change to core.flow can break core.flow.TreeCommand, while a change to core.flow.TreeCommand can't break core.flow.
Position
Below the diagonal: core.flow.TreeCommand uses a module listed above it, which is the healthy direction.
neblink.CredentialDiagnostics uses neblink, so a change to neblink can break neblink.CredentialDiagnostics, while a change to neblink.CredentialDiagnostics can't break neblink.
Position
Below the diagonal: neblink.CredentialDiagnostics uses a module listed above it, which is the healthy direction.
agent.SubAgentStartupRecovery uses actor, so a change to actor can break agent.SubAgentStartupRecovery, while a change to agent.SubAgentStartupRecovery can't break actor.
Position
Below the diagonal: agent.SubAgentStartupRecovery uses a module listed above it, which is the healthy direction.
agent.SubAgentStartupRecovery uses agent, so a change to agent can break agent.SubAgentStartupRecovery, while a change to agent.SubAgentStartupRecovery can't break agent.
Position
Below the diagonal: agent.SubAgentStartupRecovery uses a module listed above it, which is the healthy direction.
gateway uses neblink.CredentialDiagnostics, so a change to neblink.CredentialDiagnostics can break gateway, while a change to gateway can't break neblink.CredentialDiagnostics.
Position
Below the diagonal: gateway uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
127
High / Critical
A03:2025 — Software Supply Chain Failures
17
High / Critical
A02:2025 — Security Misconfiguration
11
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: 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; Resolve the 1 finding(s) in Type Safety; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.
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 — 194
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 — 3284
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 — 178
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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 82 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 — 82 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 3623 of 3656 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .py, .scala, and our analyzer cannot run the .scala test suite(s) — so no coverage was collected for the repository as a whole. The Python half did build and run, and its own line coverage came back at 0.0% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 932 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 909 test source file(s) (.scala) 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 (.scala, .mjs) and this repository declares an sbt build (repository root, 909 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 sbt 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.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (7 contributor(s) across 5774 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 6 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (src/main/resources/seed/plugins/design-cards/skills/guizang-social-card-skill/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D28 Secrets (history) — 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `evidence/20261019_171500_alloc-key-notimeout/raw/keyref-alignment.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
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. `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala`, `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala`, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala`, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala`, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala`, … (+148 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AC2 Forms & labels — 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. 166 further occurrence(s) are not listed individually; the score already reflects all 206.
AC3 Page structure — 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. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
AC4 Keyboard semantics — 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. 133 further occurrence(s) are not listed individually; the score already reflects all 173.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 224 further occurrence(s) are not listed individually; the score already reflects all 264.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/main/scala/nebflow/llm/imagegen/ImageGenJobs.scala, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX2 Stateful singletons — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection singletons in C#, Spring/JSR-330/CDI singletons in Java and Kotlin, module state in Python request handlers, handler state in Go and Swift, Play controllers, Cask routes, Scalatra servlets, Finatra controllers, Akka/Pekko HTTP routes and JSR-330 singletons in Scala, Rails, Sinatra, Grape, Roda and Hanami handlers and Rack apps in Ruby, and module state in F# request handlers (Giraffe, Saturn, Falco, Oxpecker and Suave handlers and ASP.NET Core controllers) only, and this repository's product is written in Scala (http4s), which was left unread, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The image build failed, and its output does not match a cause we recognise. (rule: unrecognised-build-failure). The renderer reported: docker build failed (exit 1) — #7 ERROR: lstat /target: no such file or directory ------ > [3/4] COPY target/scala-*/stand-assembly-*.jar /app/app.jar: ------ REDACTED:10 -------------------- 8 | WORKDIR /workspace 9 | 10 | >>> COPY target/scala-*/${lower_name}-assembly-*.jar /app/app.jar 11 | 12 | # Create config directory -------------------- ERROR: failed to solve: lstat /target: no such file or directory; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — #7 ERROR: lstat /target: no such file or directory ------ > [3/4] COPY target/scala-*/stand-assembly-*.jar /app/app.jar: ------ REDACTED:10 -------------------- 8 | WORKDIR /workspace 9 | 10 | >>> COPY target/scala-*/${lower_name}-assembly-*.jar /app/app.jar 11 | 12 | # Create config directory -------------------- ERROR: failed to solve: lstat /target: no such file or directory; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
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.
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.
PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 68 further occurrence(s) are not listed individually; the score already reflects all 108.
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. 461 further occurrence(s) are not listed individually; the score already reflects all 501.
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. 778 further occurrence(s) are not listed individually; the score already reflects all 818.
R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 38 further occurrence(s) are not listed individually; the score already reflects all 78.
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. 27 further occurrence(s) are not listed individually; the score already reflects all 67.
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. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
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. 219 further occurrence(s) are not listed individually; the score already reflects all 259.
X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 235 further occurrence(s) are not listed individually; the score already reflects all 275.
X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 795 further occurrence(s) are not listed individually; the score already reflects all 835.
X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
830 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was WebSocketRoutes.handleMessage at 498. A further 5 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being chat.appendToolStreamDelta at 21 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/main/scala/nebflow/neblink/CredentialDiagnostics.scala (CredentialDiagnostics.reasonOf at 18). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 518 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with WebSocketRoutes.handleMessage (cyclomatic 498), RestApiRoutes.routes (cyclomatic 407), PresenceRoutes.routes (cyclomatic 354). — 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 11 together lifts Cyclomatic Complexity from 2.0 to about 3.3/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 950 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 125 bodies over 60 down to 60 or less in Cognitive Complexity — start with NodeEditTool.editNode (cognitive 2734), WebSocketRoutes.handleMessage (cognitive 1860), NodeEditTool.proceed (cognitive 940). — 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 125 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.3 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 96 FileTooLong finding(s) in God Classes — start with WebSocketRoutes.scala (2), REDACTED (2), explorer.js (2). — One of this dimension's main actionable groups (96 warning-level).
Resolve the 44 FunctionTooLong finding(s) in God Classes — start with REDACTED (6), input.js (2), REDACTED (2). — One of this dimension's main actionable groups (44 warning-level).
Resolve the 39 TooManyMethods finding(s) in God Classes — start with WebSocketRoutes.scala (2), NeblinkClient.scala (2), NeblinkPresenceService.scala (2). — One of this dimension's main actionable groups (39 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
625 duplicated block group(s) detected. 10.1 % of the production lines (26,402 of 261,079) are in a reported copy. A further 263 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 2 of the 888 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
Edited copy of a member (4 corresponding lines) · ×28evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:128
+ 268 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 48 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with WebSocketRoutes.scala (12), RestApiRoutes.scala (6), NeblinkPresenceService.scala (2). — One of this dimension's main actionable groups (48 warning-level).
Resolve the 39 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with WebSocketRoutes.scala (10), RestApiRoutes.scala (5), NeblinkClient.scala (4). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 32 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with WebSocketRoutes.scala (6), RestApiRoutes.scala (5), MailTool.scala (2). — One of this dimension's main actionable groups (32 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
4 production modules (npm+sbt), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a dependsOn spread (deps: _*) and a project whose directory a helper computes are not visible there; 0 module(s) off the main sequence, with abstractness counted on 3 of the 4 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with NeblinkClient.scala (2), registry.scala (2), WebSocketRoutes.scala. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.6 / 10Stronggated by 25 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
8 skipped, 17 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 932 tests. Measured on the JavaScript/TypeScript suite only — at least 909 test source file(s) (.scala) went unread, so its test quality is unmeasured and is not in these counts.
Resolve the 17 No assertions finding(s) in Test Quality — start with shots.spec.mjs (8), jev-panel-threefix.spec.mjs, perception-btn-ghost.spec.mjs. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 8 Skipped test finding(s) in Test Quality — start with plugins-panel-redesign.spec.mjs (3), attachkey-idem.spec.mjs (2), plugins-panel-two-actions.spec.mjs (2). — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
21 outdated direct sbt declarations. An sbt declaration names an EXACT version, so the remedy is an edit to the build file — there is no lockfile refresh that would move it. Test-, Provided- and it-scoped declarations are excluded, because a consumer of this project never receives them. A version held in a Scala val is read only when the val is one string literal: sbt is a program rather than a manifest, and evaluating a computed version would invent the measurement rather than take it. Whether any artifact is DEPRECATED or ABANDONED is not graded and cannot be — Maven Central publishes no such marker, and release age does not stand in for one: the most widely depended-upon libraries are routinely the stalest, being finished rather than abandoned. Known CVEs in this dependency graph are D30's question.
Outdated: ch.qos.logback:logback-classic · ×21
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 21 declared sbt dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the production coordinates this repository's 3 sbt build file(s) (build.sbt and project/*.scala) declare with a literal version, directly or through a string-literal val — `%%` resolved to the Scala binary suffix Central publishes under, test-scoped declarations excluded — the same declaration-site closure this analysis reads for dependency currency. sbt has no lockfile a checkout carries, so this is deliberately NOT the transitive closure. ★ COVERAGE OF THIS VERDICT: it grades this repository's sbt 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.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/main/resources/web/js/main.js (246×89=21894); src/main/resources/web/js/chat.js (138×133=18354); src/main/scala/nebflow/gateway/WebSocketRoutes.scala (235×73=17155) Repeated repair below the complexity floor: src/main/scala/nebflow/neblink/NeblinkEnrollment.scala (8 of 15 changes were fixes); src/main/scala/nebflow/cli/DetachedApply.scala (7 of 9 changes were fixes); src/main/scala/nebflow/core/delegate/DeviceDelegate.scala (4 of 7 changes were fixes)
Resolve the 147 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.js, chat.js, WebSocketRoutes.scala. — One of this dimension's main actionable groups (147 warning-level).
Resolve the 7 Repeated repair finding(s) in Churn × Complexity Hotspots — start with NeblinkEnrollment.scala, DetachedApply.scala, DeviceDelegate.scala. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
1 deducted task-comment markers across 261079 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with TaskStore.scala. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F4 map. 68 document(s) read across 4 unit(s).
Documentation: no map of the repository's partsREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
3 naming inconsistencies among 49 declarations measured against a convention their peers follow.
`NebflowUI` spells `UI` where 20 names in the project spell it `Ui` · ×2src/main/scala/nebflow/cli/ui.scala:12
`safeGetJSON` spells `JSON` where 28 names in the project spell it `Json`src/main/resources/web/js/persistence.js:124
What to do
Resolve the 2 `NebflowUI` spells `UI` where 20 names in the project spell it `Ui` finding(s) in Naming Consistency — start with ui.scala (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 `safeGetJSON` spells `JSON` where 28 names in the project spell it… finding(s) in Naming Consistency — start with persistence.js. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the namessrc/main/resources/web/js/chat.js:264
What to do
Resolve the 9 redundant comment finding(s) in Comment Value — start with i18n.js (2), inputModes.js (2), verify-i18n-sweep.cjs. — One of this dimension's main actionable groups (9 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 4 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionpackage.json:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
127 finding(s): 0 critical, 90 high, 35 medium, 2 low. 73 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 187 file(s) — `bing2.html` (line 54, line 57, line 60, …), `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala`, `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala`, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala`, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala`, … (+182 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
No action in Static Analysis (SAST) — all 73 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (73 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 5 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 661 of the 738 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 5 Change coupling finding(s) in Change Coupling — start with EditTool.scala, GlobTool.scala, bgAgentPopup.js. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with en.js, zh-CN.js. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
End-of-life runtime: Scala 3.5build.sbt:1
What to do
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with build.sbt. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives4.3 / 10Weak✓ 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. (×6) — design/logo/preview.html:13, design/logo/preview.html:15, design/logo/preview.html:20, …
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×5) — src/main/resources/seed/plugins/design-cards/skills/guizang-social-card-skill/assets/template-editorial-card.html:783, src/main/resources/web/js/attachImagePreview.js:174, src/main/resources/web/js/socialPanel.js:1625, …
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — src/main/resources/web/js/viewers/video.js:52
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.
Do you agree with this assessment?
AC2 · Forms & labels5.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×10) — design/20261006_askuser_redesign/hybrid/mockup.html:316, design/20261006_askuser_redesign/hybrid/mockup.html:345, design/20261006_askuser_redesign/style-1/mockup.html:259, …
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×20) — design/20261006_askuser_redesign/style-2/mockup.html:390, reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:329, reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:330, …
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — design/20261006_askuser_redesign/style-3/mockup.html:315, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:770, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:784, …
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. (×5) — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1175, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1179, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1184, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×3) — bing1.html:1, design/logo/preview.html:1, REDACTED:413
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×27) — bing1.html:1, design/20261006_askuser_redesign/index.html:2, design/20261006_askuser_redesign/pipeline/_validate/test.html:3, …
An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — bing2.html:21
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×4) — bing2.html:47, reports/20261020_211500_mobile-mockup-375-v2__delegate-nebflow-74eb4637.html:503, reports/20261020_214500_mobile-mockup-375-v3__delegate-nebflow-74eb4637.html:583, …
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×2) — design/20261006_askuser_redesign/pipeline/_validate/test.html:3, REDACTED:413
With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:2
An empty <title> gives no page name in the tab, history or screen-reader page list. Put descriptive text in the <title>. — src/main/resources/web/index.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. — src/main/resources/web/index.html:35
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
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. — bing2.html:47
The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×6) — design/20261006_askuser_redesign/style-2/mockup.html:322, design/20261006_askuser_redesign/style-2/mockup.html:329, design/20261006_askuser_redesign/style-3/mockup.html:267, …
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×9) — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:700, evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:752, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:176, …
The repo's own CSS styles .ctx-sub with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2664, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2669
The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×13) — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2680, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2681, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2683, …
The repo's own CSS styles .task-node with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — reports/20261019_154300_external-executor-detail-mockup__delegate-nebflow-e0b069db.html:286
An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:372
The repo's own CSS styles .pill with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:506
A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×6) — reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:548, reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:620, reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:556, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.callout` sets color: #7a7f87 on background-color: #ffffff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design/20261006_askuser_redesign/index.html:41
`footer.declare` sets color: #7a7f87 on background-color: #ffffff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design/20261006_askuser_redesign/index.html:81
`.option-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — design/20261006_askuser_redesign/style-2/mockup.html:179
`.option-custom-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — design/20261006_askuser_redesign/style-2/mockup.html:231
`.answer` 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. — design/20261006_askuser_redesign/style-3/mockup.html:136
`.primary` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design/20261006_askuser_redesign/style-3/mockup.html:142
`.chip.picked` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design/20261006_askuser_redesign/style-3/mockup.html:169
`.send` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design/20261006_askuser_redesign/style-3/mockup.html:234
`.spin` moves (`animation: rot 0.9s linear infinite`) 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. — reports/20261019_154300_external-executor-detail-mockup__delegate-nebflow-e0b069db.html:164
`.boot-step.active .dot::after` moves (`animation: spin .8s linear infinite`) 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. — reports/20261019_171617_coldstart-loading-card-mockup__delegate-nebflow-cae4c10b.html:95
`.sk-bar` moves (`animation: shimmer 1.3s ease infinite`) 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. — reports/20261019_171617_coldstart-loading-card-mockup__delegate-nebflow-cae4c10b.html:122
`.wbtn` moves (`transition: background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .1s 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. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:194
`.dd-face .chev` moves (`transition: transform .15s 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. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:213
`.dd.open .dd-pop` moves (`animation: ddIn .14s 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. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:225
`.zbtn` moves (`transition: background .15s,transform .1s ease,outline-color .15s`) 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. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:247
`.demo-side` moves (`transition: opacity .2s,transform .2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:268
`.wsearch input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:186
`.dd-opt` 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. — reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:232
`.deck-btn` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, box-shadow 0.18s 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. — reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:272
`#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×5) — reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:484, reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:496, reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:508, …
`.deck-fab` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease,
opacity 0.18s ease, box-shadow 0.18s 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. (×4) — reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:276, reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:272, reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:316, …
`.face.restore` moves (`transition: transform 0.32s cubic-bezier(0.3, 1.25, 0.6, 1), opacity 0.28s 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. — reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:332
`.cpanel.restore` moves (`transition: transform 0.32s cubic-bezier(0.3, 1.25, 0.6, 1), opacity 0.28s 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. (×2) — reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:266, reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:271
`.rbtn .bdg` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:86
`.avx .cam` sets color: #81838a on background-color: #1c1f27 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:93
`.ibar .cbtn.stop` sets color: #fff on background-color: #f44336 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:116
`.zone` moves (`transition: right .22s var(--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. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:62
`.sheet` moves (`transition: transform .26s var(--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. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:100
`.chain .mem .st.run` moves (`animation: spin 1s linear infinite`) 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. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:119
`.rbar` moves (`transition: width .22s var(--ease),padding .22s var(--ease),border-radius .22s var(--ease),opacity .22s`) 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. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:169
`.sw::after` moves (`transition: left .2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:237
`.stbtn .bdg` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:84
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`AgentRuntimePort` declares 16 abstract members: `sessionStore`, `actorSystem`, `contextWindow`, `effectiveSafetyMode`, `subAgentTaskStore`, `pluginMcp`, `scheduledTaskStore`, `scheduledTaskService`, `neblinkService`, `dropboxService`, `friendService`, `healthMonitor`, `interactionHubRef`, `spawnAgentActor`, `spawnSupervisedAdapter`, `agentActorBehavior`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/main/scala/nebflow/core/AgentRuntimePort.scala:41
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Code Health — Unreviewed-generation residue in this repository's Scala: methods whose whole body is still `???` or a "not implemented" throw where nothing overrides them, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Scala: methods whose body is `???` or only throws a "not implemented" error, 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.
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×14) — src/test/scala/nebflow/agent/AgentControlE2ESpec.scala:239, src/test/scala/nebflow/agent/AgentControlE2ESpec.scala:319, src/test/scala/nebflow/agent/DeleteSessionCascadeSpec.scala:226, …
What to do
Clear the softer debt: re-enable or delete `ignore`d and `pending` tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace a bare `// scalastyle:off` or `@nowarn` with targeted, justified suppressions.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
1 ADR-shaped document(s) detected by content — `src/main/resources/seed/plugins/document-production/skills/xlsx/engines/chart.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
`package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:8
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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.
`runGateway` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs. — src/main/scala/nebflow/gateway/GatewayMain.scala:382
`mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×6) — design/20261006_askuser_redesign/pipeline/before-shot.cjs:33, scripts/e2e-avatar-flicker.cjs:601, scripts/e2e-avatar-flicker.cjs:652, …
`readFileSync` in `page.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×8) — design/20261006_askuser_redesign/pipeline/before-shot.cjs:68, reports/20261027_220000_mobile-canvas-ux/audit-shots.mjs:32, scripts/e2e-bg-progress-visibility.cjs:126, …
`statSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — design/20261006_askuser_redesign/pipeline/before-shot.cjs:123
`readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — evidence/20261020_033000_plugin-panel/shoot.mjs:29
`existsSync` in `token` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-archive-restart-visibility.mjs:210
`readFileSync` in `token` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-archive-restart-visibility.mjs:210
`execSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×5) — scripts/e2e-askuser-source-label.mjs:93, scripts/e2e-dispatcher-context-catalog.mjs:59, scripts/e2e-dream-agent.mjs:70, …
`readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×10) — scripts/e2e-avatar-flicker.cjs:238, scripts/e2e-avatar-flicker.cjs:242, scripts/e2e-bgtask-notify-detail.cjs:81, …
`writeFileSync` in `callback to shots.forEach` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-avatar-flicker.cjs:345
`writeFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-avatar-flicker.cjs:654
`existsSync` in `readMarker` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-onboarding-v2-isolated.mjs:189
`readFileSync` in `readMarker` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-onboarding-v2-isolated.mjs:190
`rmSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-perception-authchain.mjs:170
`readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/e2e-perception-authchain.mjs:210
What to do
Scala: compose the Future or effect (map/flatMap, a for-comprehension) instead of Await.result or unsafeRunSync, and wrap unavoidable blocking calls in blocking { } (Future), IO.blocking or ZIO.attemptBlocking.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety0.2 / 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.
11 typed · 624 plain JS — the untyped files are design/20261006_askuser_redesign/pipeline/before-shot.cjs, design/20261006_askuser_redesign/pipeline/shot.cjs, evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js, evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, evidence/20261019_131000_brand-standard-console/shoot-console.mjs, evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs (+618 more).
Do you agree with this assessment?
R10 · Code Duplication4.7 / 10Weak✓ 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.
54 duplicated blocks under the repository root have copies in at least two of the sibling directories design, evidence, reports, scripts, src, tools — 50 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 54 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 54 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 54 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510
5 duplicated blocks under evidence/ have copies in at least two of the sibling directories 20261019_131000_brand-standard-console, 20261019_145000_avatar-sharp, 20261019_153500_tasklist-display-fixes, 20261020_033000_plugin-panel, 20261020_122300_auth-trim — 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. — evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510 · REDACTED:2377 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3075 · REDACTED:2934 — the two spans are one implementation copied and then locally edited — 2356 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3075
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:161 · REDACTED:204 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:161
src/main/resources/web/js/persistence.js:637 · src/main/resources/web/js/persistence.js:1030 — the two spans are one implementation copied and then locally edited — 2363 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. — src/main/resources/web/js/persistence.js:637
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:222 · src/main/resources/web/js/explorer.js:152 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:222
src/main/resources/web/js/bgAgentPopup.js:346 · src/main/resources/web/js/flowAgentPopup.js:392 — the two spans are one implementation copied and then locally edited — 1774 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/main/resources/web/js/bgAgentPopup.js:346
scripts/e2e-perm-default.mjs:207 · scripts/e2e-perm-global.mjs:223 — the two spans are one implementation copied and then locally edited — 2170 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. — scripts/e2e-perm-default.mjs:207
scripts/e2e-dream-agent.mjs:48 · scripts/e2e-project-memory.mjs:42 — the two spans are one implementation copied and then locally edited — 1953 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. — scripts/e2e-dream-agent.mjs:48
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1645 · src/main/resources/web/js/sidebar/providersUi.js:173 — the two spans are one implementation copied and then locally edited — 2060 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1645
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3476 · src/main/resources/web/js/sidebar/pathRules.js:13 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3476
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1250 · src/main/resources/web/js/explorer.js:1625 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1250
scripts/verify-flowmap-archive-visibility.cjs:34 · scripts/verify-flowmap-deps.cjs:20 — the two spans are one implementation copied and then locally edited — 1444 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. — scripts/verify-flowmap-archive-visibility.cjs:34
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:664 · src/main/resources/web/js/explorer.js:563 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:664
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:74 · src/main/resources/web/js/explorer/selection.js:25 — the two spans are one implementation copied and then locally edited — 779 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:74
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1961 · REDACTED:1807 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1961
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1034 · src/main/resources/web/js/explorer.js:1397 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1034
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1374 · REDACTED:1559 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1374
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:628 · REDACTED:685 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:628
scripts/e2e-askuser-source-label.mjs:260 · scripts/e2e-dream-agent.mjs:209 — the two spans are one implementation copied and then locally edited — 528 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. — scripts/e2e-askuser-source-label.mjs:260
reports/20261025_115023_mail-perception-design-r2/shots.mjs:7 · reports/20261025_141024_mail-perception-design-r3/shots.mjs:7 — the two spans are one implementation copied and then locally edited — 674 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. — reports/20261025_115023_mail-perception-design-r2/shots.mjs:7
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1451 · src/main/resources/web/js/explorer.js:1832 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1451
scripts/e2e-perm-default.mjs:71 · scripts/e2e-plugin-surface-live.mjs:50 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/e2e-perm-default.mjs:71
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:563 · src/main/resources/web/js/explorer.js:495 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:563
src/main/resources/web/js/fmDropboxCache.js:79 · src/main/resources/web/js/fmMessageCache.js:112 — the two spans are one implementation copied and then locally edited — 331 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/main/resources/web/js/fmDropboxCache.js:79
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:911 · src/main/resources/web/js/explorer.js:1213 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:911
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1306 · REDACTED:1475 — 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. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1306
src/main/resources/web/js/flowMap/badges.js:18 · src/main/resources/web/js/fmNodeCard.js:61 — 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. — src/main/resources/web/js/flowMap/badges.js:18
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1583 · src/main/resources/web/js/explorer.js:1975 — 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. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1583
scripts/e2e-dispatcher-context-catalog.mjs:123 · scripts/e2e-plugin-surface-live.mjs:211 — 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. — scripts/e2e-dispatcher-context-catalog.mjs:123
scripts/e2e-avatar-flicker.cjs:40 · REDACTED:38 — 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. — scripts/e2e-avatar-flicker.cjs:40
evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85 · evidence/20261019_153500_tasklist-display-fixes/shoot-tasklist.mjs:133 — the two spans are one implementation copied and then locally edited — 313 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. — evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85
scripts/e2e-header-collision.cjs:170 · scripts/shot-header-name.cjs:99 — 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. — scripts/e2e-header-collision.cjs:170
src/main/resources/web/js/chatSearch.js:1021 · src/main/resources/web/js/chatSearch.js:1200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/main/resources/web/js/chatSearch.js:1021
scripts/e2e-bgtask-panel-lifecycle.cjs:50 · scripts/e2e-subagentpanel-liveonly.cjs:78 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/e2e-bgtask-panel-lifecycle.cjs:50
src/main/resources/web/js/dropbox.js:685 · REDACTED:2994 — the two spans are one implementation copied and then locally edited — 248 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/main/resources/web/js/dropbox.js:685
scripts/smoke-agentcontrol-ws.mjs:31 · scripts/smoke-scheduled-task.mjs:60 — 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. — scripts/smoke-agentcontrol-ws.mjs:31
src/main/resources/web/js/bgAgentPopup.js:1040 · src/main/resources/web/js/flowAgentPopup.js:556 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/main/resources/web/js/bgAgentPopup.js:1040
src/main/resources/web/js/contacts.js:356 · src/main/resources/web/js/contacts.js:1060 — the two spans are one implementation copied and then locally edited — 281 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. — src/main/resources/web/js/contacts.js:356
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
scripts/e2e-usage-dashboard-open.mjs:23 imports tests/helpers/session-rail.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/e2e-usage-dashboard-open.mjs:23
What to do
Fix the listed violations: move the shared test helper into a source directory production code may depend on (1 row).
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
validateVisualEvidenceContract has cyclomatic complexity 159 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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:1376
(anonymous) has cyclomatic complexity 151 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:332
validateProjectContract has cyclomatic complexity 149 and cognitive complexity 156; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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:2378
buildHistoryRow has cyclomatic complexity 109 and cognitive complexity 214; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/persistence.js:1017
scenarioB has cyclomatic complexity 105 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/imgmsg-send.spec.mjs:569
(anonymous) has cyclomatic complexity 88 and cognitive complexity 170; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/persistence.js:627
scenarioQuote has cyclomatic complexity 83 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/msgmenu.spec.mjs:393
deckFrame has cyclomatic complexity 80 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/canvas.js:2536
send has cyclomatic complexity 77 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/input.js:192
lintGeometry has cyclomatic complexity 75 and cognitive complexity 137; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs:972
renderTool has cyclomatic complexity 73 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/chat.js:932
openWorkspaceItem has cyclomatic complexity 73 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/canvas.js:1274
renderDetail has cyclomatic complexity 71 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/flowMapArchive.js:929
buildDelegateFm has cyclomatic complexity 70 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/delegateFlowMap.js:72
(anonymous) has cyclomatic complexity 69 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/main.js:4486
bgTaskRowHtml has cyclomatic complexity 68 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/main/bgAgents.js:464
inspectSvg has cyclomatic complexity 67 and cognitive complexity 131; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1175
handleSend has cyclomatic complexity 66 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tools/weixin-sidecar/send.mjs:850
onmessage has cyclomatic complexity 63 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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:1167
nodeHtml has cyclomatic complexity 63 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/fmNodeCard.js:260
(anonymous) has cyclomatic complexity 62 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/main.js:1289
draw has cyclomatic complexity 61 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/wikiGraph.js:1042
lintFigureScene has cyclomatic complexity 61 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs:1156
scenarioJump has cyclomatic complexity 61 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/msgmenu.spec.mjs:1488
makeReference has cyclomatic complexity 60 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/reference.js:102
afterSuite has cyclomatic complexity 60 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/social-panel.spec.mjs:747
scenarioSelect has cyclomatic complexity 60 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/msgmenu.spec.mjs:642
(anonymous) has cyclomatic complexity 59 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/e2e-header-collision.cjs:165
replayHistoryPageInitialLoad has cyclomatic complexity 58 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/chat/historyReplay.js:44
validateRegistryCandidateDecisions has cyclomatic complexity 57 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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:2005
scenarioUiFaces has cyclomatic complexity 55 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. — tests/msgmenu.spec.mjs:1108
(anonymous) has cyclomatic complexity 54 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/verify-sidebar-toggle-v2.cjs:86
main has cyclomatic complexity 51 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:77
runTheme has cyclomatic complexity 51 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/e2e-wiki-graph-redesign.cjs:359
scenarioF has cyclomatic complexity 49 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/imgmsg-send.spec.mjs:1023
rebuildSim has cyclomatic complexity 49 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/wikiGraph.js:658
scenarioForwardWindow has cyclomatic complexity 49 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/msgmenu.spec.mjs:923
inspectMermaid has cyclomatic complexity 47 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1088
main has cyclomatic complexity 46 and cognitive complexity 148; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:200
chainFromStoreRecord has cyclomatic complexity 46 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/main/resources/web/js/delegateChainStub.js:264
Do you agree with this assessment?
R3 · Large Files0.3 / 10Critical✓ 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.
REDACTED has 6178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/main/resources/web/js/main.js has 4600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/main.js:1
src/main/resources/web/js/canvas.js has 4560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/canvas.js:1
src/main/resources/web/js/chat.js has 4025 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/chat.js:1
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED has 3409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1
REDACTED has 3116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs has 2468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1
src/main/resources/web/js/flowMapTab.js has 2248 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/flowMapTab.js:1
src/main/resources/web/js/input.js has 2207 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/input.js:1
src/main/resources/web/js/chatSearch.js has 1908 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/chatSearch.js:1
src/main/resources/web/js/socialPanel.js has 1860 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/socialPanel.js:1
src/main/resources/web/js/explorer.js has 1859 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/explorer.js:1
src/main/resources/web/js/persistence.js has 1629 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/persistence.js:1
src/main/resources/web/js/wikiGraph.js has 1613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/wikiGraph.js:1
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js has 1476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1
src/main/resources/web/js/projectTab.js has 1448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/projectTab.js:1
src/main/resources/web/js/micOrb.js has 1444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/micOrb.js:1
src/main/resources/web/js/flowMapArchive.js has 1420 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/flowMapArchive.js:1
src/main/resources/web/js/localStore.js has 1392 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/localStore.js:1
src/main/resources/web/js/utils.js has 1388 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/utils.js:1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs has 1382 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs:1
src/main/resources/web/js/friendsApi.js has 1379 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/friendsApi.js:1
REDACTED has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs has 1261 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs:1
src/main/resources/web/js/contacts.js has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/contacts.js:1
src/main/resources/web/js/onboarding.js has 1198 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/onboarding.js:1
tools/weixin-sidecar/msgloop.mjs has 1108 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/weixin-sidecar/msgloop.mjs:1
src/main/resources/web/js/usageDashboard.js has 1107 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/usageDashboard.js:1
src/main/resources/web/js/taskList.js has 1056 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/taskList.js:1
src/main/resources/web/js/delegatePanoramaView.js has 1051 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/delegatePanoramaView.js:1
src/main/resources/web/js/dropbox.js has 1049 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/dropbox.js:1
src/main/resources/web/js/popArtifacts.js has 1049 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/popArtifacts.js:1
tools/weixin-sidecar/send.mjs has 1027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tools/weixin-sidecar/send.mjs:1
src/main/resources/web/js/bgAgentPopup.js has 1003 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/bgAgentPopup.js:1
src/main/resources/web/js/viewers/shared.js has 1002 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/viewers/shared.js:1
src/main/resources/web/js/activityBar.js has 985 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/activityBar.js:1
src/main/resources/web/js/perception.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/perception.js:1
src/main/resources/web/js/plugins.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/plugins.js:1
src/main/resources/web/js/secretsPanel.js has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/secretsPanel.js:1
src/main/resources/web/js/delegateChainView.js has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/resources/web/js/delegateChainView.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage7.3 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1, REDACTED:1, src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
the root package is TypeScript, but a type error in it cannot fail anything this repository runs: its `build` script (`node REDACTED`) compiles TypeScript with a transpile-only tool that strips types without checking them, and no script, config or CI step of the package runs `tsc --noEmit` or another type checker over it. Add a type check that can fail — a `typecheck` script running `tsc --noEmit` (or `vue-tsc`/`svelte-check`) that CI or the workspace pipeline runs, or a build step that checks before it bundles. — package.json:6
Do you agree with this assessment?
R7 · Dead Code7.8 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 466 application, 100 tooling and 313 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 (466 application, 100 tooling, 313 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 (×16) — scripts/verify-task-progress.cjs, scripts/verify-batch829.cjs, scripts/verify-ref-c3.cjs, …
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×23) — evidence/20261019_210000_mobile-quickwins/harness/boot-harness.mjs:16, evidence/20261019_210000_mobile-quickwins/harness/boot-harness.mjs:28, scripts/e2e-avatar-flicker.cjs:386, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — design/20261006_askuser_redesign/pipeline/before-shot.cjs:17, evidence/20261020_122300_auth-trim/capture-evidence.mjs:5
Declared in src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/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. — src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/package.json:7
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
src/main/resources/web/js/canvas.js → src/main/resources/web/js/projectTab.js → src/main/resources/web/js/canvas.js (one verified cycle inside a mutually-dependent group of 3 files) — src/main/resources/web/js/canvas.js:568
Other · Security — Read from this repository's Scala source and the Java beside it: 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. This repository serves HTTP itself (src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:111 — `HttpServer.create`), so its Scala source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Scala spelling appears in production source, not proven on every route. A Play application is credited the security headers Play's default `SecurityHeadersFilter` sends unless its build or configuration switches that filter off, and its cookies the HttpOnly flag Play sets by default.
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+ (`MessageDigest.getInstance("SHA-256")`) 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. — src/main/scala/nebflow/neblink/NeblinkModel.scala:290
`https://unpkg.com/lucide@latest/dist/umd/lucide.min.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. — src/main/resources/seed/plugins/design-cards/skills/guizang-social-card-skill/assets/template-swiss-card.html:10
This repository runs an HTTP server and nothing in its Scala source or committed configuration secures the transport: no HTTPS served (akka/pekko-http `ConnectionContext.httpsServer`/`enableHttps`, an http4s builder's `withTLS`, Jetty's `SslContextFactory`, zio-http's `SSLConfig`, Play's `https.port`), no `Strict-Transport-Security` header, HSTS middleware or Play `RedirectHttpsFilter`, no `X-Forwarded-Proto` read or Play `play.http.forwarded.trustedProxies` for a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:111 — `HttpServer.create`.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Scala server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:111 — `HttpServer.create`.
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.
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.
Secure the server's transport: serve TLS itself (akka/pekko-http `ConnectionContext.httpsServer(sslContext)` with `newServerAt(…).enableHttps(…)`, an http4s server builder's `withTLS(…)`, Play's `https.port`), or run it behind a TLS-terminating proxy and trust it (`X-Forwarded-Proto`; Play `play.http.forwarded.trustedProxies`); send `Strict-Transport-Security` once it is HTTPS-only (http4s `HSTS(…)`, Play `RedirectHttpsFilter`).
Set security response headers on what the server sends — keep Play's `SecurityHeadersFilter` enabled, wrap akka/pekko-http routes in `respondWithHeaders(RawHeader("X-Content-Type-Options", "nosniff"), …)`, or add an http4s middleware that sets `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 291) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 292 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright. — src/main/scala/nebflow/gateway/RestApiCtx.scala:292
This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 3858) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 3859 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3859
What to do
Each finding names the IPv4 branch that rejects the host and the IPv6 branch that accepts the same host in another notation. Confirm from the two, then unwrap every IPv4-in-IPv6 embedding before classifying, or reject non-native IPv6 outright.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied 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.
`GateRedact.redact` is public and takes `json: Json` from its caller, and it calls itself at line 268 with a piece of `json` (and at line 271), not as a tail call the compiler turns into a loop — and nowhere in `GateRedact.redact` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a walk like this one throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25), while `ujson.read`, Jackson's `readTree` before 2.15 and circe before 0.14.16 accept any nesting (2,000,000 levels from 4 MB) and circe 0.14.16 accepts 4,096 — on a cold JVM even play-json's cap of 1,000 is past the point the walk fails. `StackOverflowError` is not `NonFatal`: `Try`, `case NonFatal(e)` and `recover` do not stop it, and in a `Future` on the global execution context it leaves the future forever incomplete. Thread a depth argument through `GateRedact.redact` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/main/scala/nebflow/core/McpToolGate.scala:268
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. (×7) — src/main/scala/nebflow/shared/FileHistory.scala:107, src/main/scala/nebflow/core/LlmLogWriter.scala:936, src/main/scala/nebflow/core/LlmLogWriter.scala:965, …
`java.nio.file.Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(java.nio.file.Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — src/main/scala/nebflow/perception/PerceptionService.scala:465
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 20/93 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`fetchAgents` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/agentManager.js:46
`fetchAgentDetail` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/agentManager.js:55
`fetchAgentModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/agentManager.js:63
`stagePreviewDeclaration` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/attachUpload.js:506
`cancelUpload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/attachUpload.js:567
`refreshDataUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/avatarCache.js:96
`fetchAgentModelBadge` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — src/main/resources/web/js/bgAgentPopup.js:1070, src/main/resources/web/js/flowAgentPopup.js:588
`_fetchTts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/chat.js:155
`downloadAttachmentFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/chat.js:2886
`apiCall` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — src/main/resources/web/js/daemonPanel.js:233, src/main/resources/web/js/daemons.js:292
`fetchDaemons` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/daemons.js:307
`fetchDelegateOutput` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:68
`openDelegateNative` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:85
`fetchDelegateDetail` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:106
`fetchDelegateChildren` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:122
`fetchArchivedDelegates` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:138
`archiveDelegate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:157
`unarchiveDelegate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateApi.js:180
`fetchJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/delegateChainProvider.js:57
`getDeviceRoster` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/deviceRoster.js:31
`fetchFileChanges` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/diffView.js:15
`saveDeviceDescription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/dropbox.js:376
`fetchExecutors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/executorsPanel.js:23
`renderExecutors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/executorsPanel.js:85
`resolveFlowNodeSession` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowAgentPopup.js:371
`populateAgentModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowViewers.js:35
`openRules` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowViewers.js:152
`loadPendingSection` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowViewers.js:215
`openMailbox` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowViewers.js:289
`openDefinition` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/flowViewers.js:340
`req` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/friendsApi.js:128
`downloadAttachment` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/friendsApi.js:717
`fetchStamp` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/hotStamp.js:56
`addPathAttachment` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/input.js:2244
`importLegacyAvatar` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/localStore.js:545
`fetchOnce` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/main/resources/web/js/mergeQueueStatus.js:121
`savedPathBlob` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:2631
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.4 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`msg.error` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:903
`t('explorer.empty')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:928
`t('explorer.reference')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1280
`t('explorer.newFile')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1281
`t('explorer.newFolder')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1282
`t('explorer.delete')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1283
`avatar` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:186
`code` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:746
`t('settings.account')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:754
`t('settings.runtime')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:767
`t('settings.thinkingMode')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:769
`t('settings.thinkingEffort.'+lvl)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:771
`t('settings.thinkingEffortHint')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:774
`t('settings.llmLog')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:776
`t('settings.language')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:783
`t('settings.autostart')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:787
`t('settings.appearance')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:794
`t('settings.providers')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:798
`t('settings.addProvider')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:802
`t('settings.presetsEmptyHint')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:809
`t('settings.presets')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:811
`t('settings.addPreset')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:814
`t('settings.advanced')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:817
`t('settings.editRawJson')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:818
`t('settings.rerunOnboarding')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:819
`t('settings.save')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:825
`t('settings.reload')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:826
`t('settings.about')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:831
`brand.productName` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:833
`t('settings.connection')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:834
`t('settings.checkUpdate')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:836
`t('settings.restart')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:837
`t('settings.updateNow')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:849
`t('settings.updateLater')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:850
`t('preset.loadFailed')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1023
`t('preset.empty')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1033
`t('preset.migrateBanner',{n:legacy.length})` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1077
`t('preset.migrateAction')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1078
`t('preset.migrateTitle')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1098
`t('modal.cancel')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1103
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for` comprehension or `foreach` leaves the mutable collection it is walking alone — an `ArrayBuffer` or `ListBuffer` counts its changes and its iterator checks the count, an `ArrayDeque` (and `mutable.Queue`/`mutable.Stack`) is walked by index up to its starting length, and a `java.util` collection walked through `asScala` is fail-fast, so a body that adds to or removes from the very collection the loop is walking makes a later step throw `ConcurrentModificationException` (`IndexOutOfBoundsException` for a deque) and the remaining elements 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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`case _: Exception` 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. (×23) — src/main/scala/nebflow/Version.scala:40, src/main/scala/nebflow/Version.scala:75, src/main/scala/nebflow/social/FeishuCredentials.scala:235, …
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. (×12) — src/main/scala/nebflow/social/FeishuChannel.scala:375, src/main/scala/nebflow/social/FeishuChannel.scala:398, src/main/scala/nebflow/social/SocialChannels.scala:372, …
`case _: Throwable` 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) — src/main/scala/nebflow/social/FeishuOutboundAdapter.scala:119, src/main/scala/nebflow/social/outbound/ContentClass.scala:60, src/main/scala/nebflow/social/outbound/FileLongShot.scala:120, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug` at line 33 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix. — src/main/scala/nebflow/shared/logging.scala:33
`debug` at line 46 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix. — src/main/scala/nebflow/shared/logging.scala:46
`debug` at line 49 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix. — src/main/scala/nebflow/shared/logging.scala:49
Other · Code Health — Whether Scala's null is held to the type system and not undermined by assertions — a file compiled with `-Yexplicit-nulls` is one where `String` excludes null and `String | Null` admits it, a file under WartRemover's `Null` wart or Scalafix's `DisableSyntax.noNulls` is one whose code cannot write `null` and must say `Option`, and each `.nn`, `import scala.language.unsafeNulls` or null-lint suppression is the author overruling that.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
No build over this repository's 667 Scala product file(s) passes `-Yexplicit-nulls`, enables WartRemover's `Null` wart or runs Scalafix's `DisableSyntax.noNulls`, so every reference type admits null and nothing reports a `null` written into the code or returned from a Java API — the first one to reach a method call is a `NullPointerException`. `Option` by convention is a habit no tool here holds the code to.
What to do
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · 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'.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 41 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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 — docker build failed (exit 1) — #7 ERROR: lstat /target: no such file or directory ------ > [3/4] COPY target/scala-*/stand-assembly-*.jar /app/app.jar: ------ REDACTED:10 -------------------- 8 | WORKDIR /workspace 9 | 10 | >>> COPY target/scala-*/${lower_name}-assembly-*.jar /app/app.jar 11 | 12 | # Create config directory -------------------- ERROR: failed to solve: lstat /target: no such file or directory; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, a MongoDB or Cassandra driver, JDBC) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not included — the .scala suite was found but not re-run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.scala), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 153 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 793 value object(s); 50 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 10 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, 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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — 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.
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.
AC4 · Keyboard semantics· Clickable element isn't keyboard-operable · ×23
Clickable element isn't keyboard-operable design/20261006_askuser_redesign/style-2/mockup.html:322— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable design/20261006_askuser_redesign/style-2/mockup.html:329— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable design/20261006_askuser_redesign/style-3/mockup.html:267— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable design/20261006_askuser_redesign/style-3/mockup.html:274— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2664— The repo's own CSS styles .ctx-sub with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2669— The repo's own CSS styles .ctx-sub with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2680— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2681— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2683— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2743— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2745— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2746— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3398— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3399— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3400— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3403— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3406— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3408— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3412— The repo's own CSS styles .ctx-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2469— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2497— The repo's own CSS styles .row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable reports/20261019_154300_external-executor-detail-mockup__delegate-nebflow-e0b069db.html:286— The repo's own CSS styles .task-node with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:506— The repo's own CSS styles .pill with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <button> with no accessible text · ×20
<button> with no accessible text design/20261006_askuser_redesign/style-2/mockup.html:390— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:329— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:330— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:331— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:332— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:334— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:352— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:353— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:361— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:362— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:363— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:364— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:365— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:366— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:367— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:368— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:389— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:390— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:391— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:392— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×15
Click handler on a non-interactive <div> evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:700— 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> evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:752— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:176— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1979— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2473— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3226— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3339— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3636— 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> evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3657— 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> reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:548— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:620— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:556— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:644— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:568— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:684— A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <input> without a programmatic label · ×8
<input> without a programmatic label design/20261006_askuser_redesign/hybrid/mockup.html:316— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label design/20261006_askuser_redesign/style-1/mockup.html:259— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label design/20261006_askuser_redesign/style-2/mockup.html:344— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label design/20261006_askuser_redesign/style-3/mockup.html:287— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1180— 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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1940— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3139— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:389— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC1 · Text alternatives· <img> without a text alternative · ×6
<img> without a text alternative design/logo/preview.html:13— 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 design/logo/preview.html:15— 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 design/logo/preview.html:20— 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 design/logo/preview.html:22— 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 src/main/resources/web/js/chat.js:3653— 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 REDACTED:103— 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· <textarea> without a programmatic label · ×5
<textarea> without a programmatic label design/20261006_askuser_redesign/hybrid/mockup.html:345— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design/20261006_askuser_redesign/style-1/mockup.html:286— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design/20261006_askuser_redesign/style-2/mockup.html:372— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design/20261006_askuser_redesign/style-3/mockup.html:315— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:823— 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· <label> that labels no control · ×5
<label> that labels no control evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1175— 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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1179— 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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1184— 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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1843— 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 reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:927— 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.
<html> without a lang bing1.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang design/logo/preview.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:413— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels· <select> without a programmatic label · ×2
<select> without a programmatic label evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:770— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:784— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure· Document without a <title> · ×2
Document without a <title> design/20261006_askuser_redesign/pipeline/_validate/test.html:3— 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> REDACTED:413— 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· Document <title> is empty · ×1
Document <title> is empty src/main/resources/web/index.html:2— An empty <title> gives no page name in the tab, history or screen-reader page list. Put descriptive text in the <title>.
Viewport restricts zoom src/main/resources/web/index.html:35— 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.
Unlisted import 'playwright' design/20261006_askuser_redesign/pipeline/before-shot.cjs:17— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'playwright-core' evidence/20261020_122300_auth-trim/capture-evidence.mjs:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Hotspot: src/main/resources/web/js/main.js src/main/resources/web/js/main.js:3133— src/main/resources/web/js/main.js changed 246 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in main.renderBgDropdown at line 3133. 90 of those changes were fix/bug commits, and the other 156 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/main.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: src/main/resources/web/js/chat.js src/main/resources/web/js/chat.js:2248— src/main/resources/web/js/chat.js changed 138 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in chat.showOptions at line 2248. 40 of those changes were fix/bug commits, and the other 98 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/chat.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: src/main/scala/nebflow/gateway/WebSocketRoutes.scala src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1035— src/main/scala/nebflow/gateway/WebSocketRoutes.scala changed 235 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in WebSocketRoutes.routes at line 1035. 76 of those changes were fix/bug commits, and the other 159 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/gateway/WebSocketRoutes.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/gateway/GatewayMain.scala src/main/scala/nebflow/gateway/GatewayMain.scala:382— src/main/scala/nebflow/gateway/GatewayMain.scala changed 158 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in GatewayMain.runGateway at line 382. 35 of those changes were fix/bug commits, and the other 123 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/gateway/GatewayMain.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/gateway/PresenceRoutes.scala src/main/scala/nebflow/gateway/PresenceRoutes.scala:205— src/main/scala/nebflow/gateway/PresenceRoutes.scala changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 354 in PresenceRoutes.routes at line 205. 12 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/gateway/PresenceRoutes.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:1294— REDACTED changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in sidebar.bindSettingsEvents at line 1294. 18 of those changes were fix/bug commits, and the other 84 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/resources/web/js/input.js src/main/resources/web/js/input.js:1567— src/main/resources/web/js/input.js changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in input.initInput at line 1567. 34 of those changes were fix/bug commits, and the other 42 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/input.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: src/main/resources/web/js/persistence.js src/main/resources/web/js/persistence.js:1017— src/main/resources/web/js/persistence.js changed 71 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in persistence.buildHistoryRow at line 1017. 19 of those changes were fix/bug commits, and the other 52 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/persistence.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: REDACTED REDACTED:1017— REDACTED changed 90 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in ws.connect at line 1017. 23 of those changes were fix/bug commits, and the other 67 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/core/entity/FlowDagExecutor.scala src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:139— src/main/scala/nebflow/core/entity/FlowDagExecutor.scala changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 177 in FlowDagExecutor.execute at line 139. 10 of those changes were fix/bug commits, and the other 31 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/entity/FlowDagExecutor.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/resources/web/js/canvas.js src/main/resources/web/js/canvas.js:3500— src/main/resources/web/js/canvas.js changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in canvas.initCapsuleRing at line 3500. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/canvas.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: src/main/scala/nebflow/core/tools/NodeEditTool.scala src/main/scala/nebflow/core/tools/NodeEditTool.scala:1803— src/main/scala/nebflow/core/tools/NodeEditTool.scala changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 231 in NodeEditTool.editNode at line 1803. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/tools/NodeEditTool.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:2162— REDACTED changed 87 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in messages.attachInlineImage at line 2162. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/core/tools/MailTool.scala src/main/scala/nebflow/core/tools/MailTool.scala:1938— src/main/scala/nebflow/core/tools/MailTool.scala changed 114 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in MailTool.deliverShortNameUnscoped at line 1938. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/tools/MailTool.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/agent/AgentProcessing.scala src/main/scala/nebflow/agent/AgentProcessing.scala:39— src/main/scala/nebflow/agent/AgentProcessing.scala changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 187 in AgentProcessing.processing at line 39. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/agent/AgentProcessing.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/gateway/NeblinkRoutes.scala src/main/scala/nebflow/gateway/NeblinkRoutes.scala:56— src/main/scala/nebflow/gateway/NeblinkRoutes.scala changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 176 in NeblinkRoutes.routes at line 56. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/gateway/NeblinkRoutes.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/core/tools/NodeTools.scala src/main/scala/nebflow/core/tools/NodeTools.scala:979— src/main/scala/nebflow/core/tools/NodeTools.scala changed 125 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in NodeTools.verdictRouteGate at line 979. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/tools/NodeTools.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/agent/AgentSessionExecution.scala src/main/scala/nebflow/agent/AgentSessionExecution.scala:538— src/main/scala/nebflow/agent/AgentSessionExecution.scala changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in AgentSessionExecution.pipeLlmCall at line 538. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/agent/AgentSessionExecution.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/agent/AgentIdle.scala src/main/scala/nebflow/agent/AgentIdle.scala:85— src/main/scala/nebflow/agent/AgentIdle.scala changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in AgentIdle.idle at line 85. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/agent/AgentIdle.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/llm/interface.scala src/main/scala/nebflow/llm/interface.scala:392— src/main/scala/nebflow/llm/interface.scala changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in LlmInterface.createLlm at line 392. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/llm/interface.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/agent/BackoffSupervisor.scala src/main/scala/nebflow/agent/BackoffSupervisor.scala:133— src/main/scala/nebflow/agent/BackoffSupervisor.scala changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in BackoffSupervisor.active at line 133. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/agent/BackoffSupervisor.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/resources/web/js/taskList.js src/main/resources/web/js/taskList.js:523— src/main/resources/web/js/taskList.js changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in taskList.buildChainHeaderRow at line 523. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/taskList.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: src/main/scala/nebflow/core/plugin/PluginRegistry.scala src/main/scala/nebflow/core/plugin/PluginRegistry.scala:585— src/main/scala/nebflow/core/plugin/PluginRegistry.scala changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in PluginRegistry.loadPlugin at line 585. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/plugin/PluginRegistry.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1093— src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in TaskStuckWatcher.recoverUngated at line 1093. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/main/resources/web/js/projectTab.js src/main/resources/web/js/projectTab.js:235— src/main/resources/web/js/projectTab.js changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in projectTab.openProjectsCreateDialog at line 235. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/projectTab.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.
FileTooLong: gateway/WebSocketRoutes.scala evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala— FileTooLong — 4016 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3516 over it, 8.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 3316 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 2816 over it, 6.63× 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: js/canvas.js src/main/resources/web/js/canvas.js— FileTooLong — 2820 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 2320 over it, 5.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: gateway/RestApiRoutes.scala evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala— FileTooLong — 2707 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2207 over it, 5.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED— FileTooLong — 2408 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 1908 over it, 4.82× 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: js/main.js src/main/resources/web/js/main.js— FileTooLong — 2342 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 1842 over it, 4.68× 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: js/chat.js src/main/resources/web/js/chat.js— FileTooLong — 2259 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 1759 over it, 4.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2111 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 1611 over it, 4.22× 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: gateway/WebSocketRoutes.scala src/main/scala/nebflow/gateway/WebSocketRoutes.scala— FileTooLong — 1907 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1407 over it, 3.81× 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: tools/NodeEditTool.scala src/main/scala/nebflow/core/tools/NodeEditTool.scala— FileTooLong — 1755 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1255 over it, 3.51× 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: agent/AgentSessionExecution.scala src/main/scala/nebflow/agent/AgentSessionExecution.scala— FileTooLong — 1644 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1144 over it, 3.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: js/flowMapTab.js src/main/resources/web/js/flowMapTab.js— FileTooLong — 1410 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 910 over it, 2.82× 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: gateway/PresenceRoutes.scala src/main/scala/nebflow/gateway/PresenceRoutes.scala— FileTooLong — 1405 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: presenceSessions (446-2352). The bar is 500 significant lines; this is 905 over it, 2.81× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tools/MailTool.scala src/main/scala/nebflow/core/tools/MailTool.scala— FileTooLong — 1399 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 899 over it, 2.80× 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: js/chatSearch.js src/main/resources/web/js/chatSearch.js— FileTooLong — 1321 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 821 over it, 2.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: processor/TaskStuckWatcher.scala src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala— FileTooLong — 1255 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 755 over it, 2.51× 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: dropbox/DropboxService.scala src/main/scala/nebflow/dropbox/DropboxService.scala— FileTooLong — 1252 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 752 over it, 2.50× 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: js/input.js src/main/resources/web/js/input.js— FileTooLong — 1236 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 736 over it, 2.47× 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: js/explorer.js src/main/resources/web/js/explorer.js— FileTooLong — 1225 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 725 over it, 2.45× 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: agent/AgentProcessing.scala src/main/scala/nebflow/agent/AgentProcessing.scala— FileTooLong — 1201 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 701 over it, 2.40× 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: agent/AgentActor.scala src/main/scala/nebflow/agent/AgentActor.scala— FileTooLong — 1166 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 666 over it, 2.33× 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: js/wikiGraph.js src/main/resources/web/js/wikiGraph.js— FileTooLong — 1120 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 620 over it, 2.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: gateway/GatewayMain.scala src/main/scala/nebflow/gateway/GatewayMain.scala— FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 574 over it, 2.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/SessionStore.scala src/main/scala/nebflow/core/SessionStore.scala— FileTooLong — 1047 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 547 over it, 2.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: social/WeixinIlinkBridgePlugin.scala src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala— FileTooLong — 995 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 495 over it, 1.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:634— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:634-639 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:687-692 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:143— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:143-148 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:182-187 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1616— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1616-1621 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:819-824 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1823— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1823-1828 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:252-257 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1872— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1872-1877 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:324-329 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3012— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3012-3017 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1094-1099 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3012` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1101` calls `invalidated` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3018` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3412— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3412-3417 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:116-121 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3412` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3632— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3632-3637 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:300-305 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1431— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1431-1436 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:969-976 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1542— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1542-1547 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1581-1586 — 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 `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1542` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2439— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2439-2444 | src/main/scala/nebflow/gateway/SocialRoutes.scala:75-80 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/main/scala/nebflow/cli/AgentCommand.scala:24— src/main/scala/nebflow/cli/AgentCommand.scala:24-29 | src/main/scala/nebflow/cli/SkillCommand.scala:20-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/cli/AgentCommand.scala:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/core/tools/LoadTool.scala:74— src/main/scala/nebflow/core/tools/LoadTool.scala:74-79 | src/main/scala/nebflow/core/tools/LoadTool.scala:152-157 — 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 `src/main/scala/nebflow/core/tools/LoadTool.scala:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1086— src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1086-1091 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1127-1132 — 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 `src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1086` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/PerceptionRoutes.scala:79— src/main/scala/nebflow/gateway/PerceptionRoutes.scala:79-84 | src/main/scala/nebflow/gateway/PerceptionRoutes.scala:91-96 — 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 `src/main/scala/nebflow/gateway/PerceptionRoutes.scala:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/PresenceRoutes.scala:1621— src/main/scala/nebflow/gateway/PresenceRoutes.scala:1621-1626 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1667-1672 — 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 `src/main/scala/nebflow/gateway/PresenceRoutes.scala:1621` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/RefResolver.scala:166— src/main/scala/nebflow/gateway/RefResolver.scala:166-171 | src/main/scala/nebflow/gateway/RefResolver.scala:173-178 — 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 `src/main/scala/nebflow/gateway/RefResolver.scala:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1390— src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1390-1399 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1447-1452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1662— src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1662-1667 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1703-1708 — 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 `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/social/outbound/OutboundText.scala:197— src/main/scala/nebflow/social/outbound/OutboundText.scala:197-202 | src/main/scala/nebflow/social/outbound/OutboundText.scala:281-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:468— src/main/scala/nebflow/core/flow/FlowTreeActor.scala:468-473 | src/main/scala/nebflow/core/flow/FlowTreeActor.scala:525-530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/core/flow/FlowTreeActor.scala:531` calls `persistTeams`, `emit` and `src/main/scala/nebflow/core/flow/FlowTreeActor.scala:474` 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 (6 lines × 2) src/main/scala/nebflow/gateway/PresenceRoutes.scala:1697— src/main/scala/nebflow/gateway/PresenceRoutes.scala:1697-1702 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1718-1723 — 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 `src/main/scala/nebflow/gateway/PresenceRoutes.scala:1697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:127— src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:127-132 | src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:147-152 — 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 `src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/main/scala/nebflow/service/ConfigService.scala:675— src/main/scala/nebflow/service/ConfigService.scala:675-680 | src/main/scala/nebflow/service/ConfigService.scala:814-819 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/main/scala/nebflow/social/FeishuScanBind.scala:238— src/main/scala/nebflow/social/FeishuScanBind.scala:238-243 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:213-218 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
FunctionTooLong: input.initInput src/main/resources/web/js/input.js:1567— FunctionTooLong — initInput runs 366 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 266 over it, 3.66× 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: projectTab.openProjectsCreateDialog src/main/resources/web/js/projectTab.js:235— FunctionTooLong — openProjectsCreateDialog runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× 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: workspacePicker.openPicker src/main/resources/web/js/workspacePicker.js:144— FunctionTooLong — openPicker runs 250 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× 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: messages.renderChatModal REDACTED:1112— FunctionTooLong — renderChatModal runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sidebar.bindSettingsEvents REDACTED:1294— FunctionTooLong — bindSettingsEvents runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× 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.send src/main/resources/web/js/input.js:192— FunctionTooLong — send runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× 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: perception.openMailEditor src/main/resources/web/js/perception.js:751— FunctionTooLong — openMailEditor runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: onboarding.askModelCard src/main/resources/web/js/onboarding.js:667— FunctionTooLong — askModelCard runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: main.renderBgDropdown src/main/resources/web/js/main.js:3133— FunctionTooLong — renderBgDropdown runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: chrome-session.main src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:77— FunctionTooLong — main runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× 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: friendGroups.buildGroupSettings src/main/resources/web/js/friendGroups.js:518— FunctionTooLong — buildGroupSettings runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× 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: delegateChainView.attachStructureArchive src/main/resources/web/js/delegateChainView.js:664— FunctionTooLong — attachStructureArchive runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: pptx.viewPptx REDACTED:234— FunctionTooLong — viewPptx runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ws.connect REDACTED:1017— FunctionTooLong — connect 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.
FunctionTooLong: RcChargeSteps.RcChargeSteps src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/src/RcChargeSteps.tsx:92— FunctionTooLong — RcChargeSteps runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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: delegatePanoramaView.buildCanvas src/main/resources/web/js/delegatePanoramaView.js:392— FunctionTooLong — buildCanvas runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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: paper-download.main src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:200— FunctionTooLong — main runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: html.viewHtml REDACTED:436— FunctionTooLong — viewHtml runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sidebar.bindSettingsEvents evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1267— FunctionTooLong — bindSettingsEvents runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: attachPreviewField.selfTest src/main/resources/web/js/attachPreviewField.js:423— FunctionTooLong — selfTest runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: chatQueue.renderQueueBar src/main/resources/web/js/chatQueue.js:16— FunctionTooLong — renderQueueBar runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: usageDashboard.buildShell src/main/resources/web/js/usageDashboard.js:157— FunctionTooLong — buildShell runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: activityBar.showLoginModal src/main/resources/web/js/activityBar.js:715— FunctionTooLong — showLoginModal runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: onboarding.askCard src/main/resources/web/js/onboarding.js:488— FunctionTooLong — askCard runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: askAttachments.mountAnswerAttachments src/main/resources/web/js/askAttachments.js:315— FunctionTooLong — mountAnswerAttachments runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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.
Sync-over-async blocking src/main/scala/nebflow/gateway/GatewayMain.scala:382— `runGateway` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs.
Sync-over-async blocking design/20261006_askuser_redesign/pipeline/before-shot.cjs:33— `mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking design/20261006_askuser_redesign/pipeline/before-shot.cjs:68— `readFileSync` in `page.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking design/20261006_askuser_redesign/pipeline/before-shot.cjs:123— `statSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking evidence/20261020_033000_plugin-panel/shoot.mjs:29— `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking reports/20261027_220000_mobile-canvas-ux/audit-shots.mjs:32— `readFileSync` in `page.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-archive-restart-visibility.mjs:210— `existsSync` in `token` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-archive-restart-visibility.mjs:210— `readFileSync` in `token` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-askuser-source-label.mjs:93— `execSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:238— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:242— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:345— `writeFileSync` in `callback to shots.forEach` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:601— `mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:652— `mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-avatar-flicker.cjs:654— `writeFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bg-progress-visibility.cjs:82— `mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bg-progress-visibility.cjs:126— `readFileSync` in `page.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-notify-detail.cjs:81— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-output-card.cjs:57— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-output-card.cjs:68— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-output-card.cjs:142— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-output-card.cjs:145— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-bgtask-panel-lifecycle.cjs:76— `readFileSync` in `p.route("**/*")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-dispatcher-context-catalog.mjs:59— `execSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/e2e-dream-agent.mjs:70— `execSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/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 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 src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.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 src/main/resources/seed/plugins/slideblocks/skills/slideblocks/scripts/slideblocks-client.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/web/js/mobile/navController.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 src/main/resources/seed/plugins/document-production/skills/pdf/scripts/html2pdf-next.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 src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/text-edit.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/build-offline.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/document-production/skills/pdf/scripts/cover_validate.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 src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/document-production/skills/pdf/scripts/html2poster.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 src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/src/RcChargeSteps.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/web/js/mobile/taskPanel.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 src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/icon-library.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/web/js/mobile/floatController.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 src/main/resources/web/js/mobile/canvasGestures.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 src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/presentation-diagram.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file evidence/20261019_153500_tasklist-display-fixes/shoot-tasklist.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/login.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/pdf-export.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
+ 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×40
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:903— `msg.error` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:928— `t('explorer.empty')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1280— `t('explorer.reference')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1281— `t('explorer.newFile')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1282— `t('explorer.newFolder')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1283— `t('explorer.delete')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:186— `avatar` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:746— `code` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:754— `t('settings.account')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:767— `t('settings.runtime')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:769— `t('settings.thinkingMode')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:771— `t('settings.thinkingEffort.'+lvl)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:774— `t('settings.thinkingEffortHint')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:776— `t('settings.llmLog')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:783— `t('settings.language')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:787— `t('settings.autostart')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:794— `t('settings.appearance')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:798— `t('settings.providers')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:802— `t('settings.addProvider')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:809— `t('settings.presetsEmptyHint')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:811— `t('settings.presets')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:814— `t('settings.addPreset')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:817— `t('settings.advanced')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:818— `t('settings.editRawJson')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:819— `t('settings.rerunOnboarding')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
TooManyMethods: SessionStore src/main/scala/nebflow/core/SessionStore.scala:113— TooManyMethods — 95 methods. The bar is 30 methods; this is 65 over it, 3.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: AgentActor src/main/scala/nebflow/agent/AgentActor.scala:21— TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× 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: MailTool src/main/scala/nebflow/core/tools/MailTool.scala:72— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.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: WebSocketRoutes src/main/scala/nebflow/gateway/WebSocketRoutes.scala:35— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.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: NeblinkClient evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:167— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: DropboxService src/main/scala/nebflow/dropbox/DropboxService.scala:69— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: NeblinkClient src/main/scala/nebflow/neblink/NeblinkClient.scala:206— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: NodeTools src/main/scala/nebflow/core/tools/NodeTools.scala:26— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FriendService src/main/scala/nebflow/neblink/FriendService.scala:97— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: RestApiRoutes evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:47— 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: WebSocketRoutes evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:33— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: NeblinkPresenceService src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:228— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NeblinkPresenceService evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:221— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: PluginRegistry src/main/scala/nebflow/core/plugin/PluginRegistry.scala:85— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: RemoteExecutor src/main/scala/nebflow/core/tools/RemoteExecutor.scala:183— 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: NeblinkService src/main/scala/nebflow/neblink/NeblinkService.scala:42— 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: TaskListStore src/main/scala/nebflow/core/tools/TaskListTool.scala:124— 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: MergeQueue src/main/scala/nebflow/core/delegate/MergeQueue.scala:52— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: WeixinIlinkBridgePlugin src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:92— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PerceptionCore src/main/scala/nebflow/perception/PerceptionService.scala:112— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LlmLogWriter src/main/scala/nebflow/core/LlmLogWriter.scala:33— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: PortalTunnelBridge src/main/scala/nebflow/neblink/PortalTunnelBridge.scala:66— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: LlmLogWriter evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:33— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: WikiService src/main/scala/nebflow/core/wiki/WikiService.scala:49— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: NeblinkRelayTunnel src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:51— 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.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:567— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:567-571 | src/main/scala/nebflow/neblink/NeblinkClient.scala:648-656 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:157— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:157-161 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:171-175 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `NebflowLogger` names `nebflow.core.NebflowLogger` in one and `nebflow.shared.NebflowLogger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:270— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:270-274 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:302-307 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1158— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1158-1165 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1710-1714 — 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 `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2118— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2118-2122 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:989-993 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4644— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4644-4649 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2526-2530 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:472— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:472-476 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:345-349 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1614— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1614-1618 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1166-1170 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1614` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2970— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2970-2974 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1439-1443 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2970` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3503— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3503-3507 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3514-3518 — 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 `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3503` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/agent/AskAnswerLanding.scala:142— src/main/scala/nebflow/agent/AskAnswerLanding.scala:142-147 | src/main/scala/nebflow/agent/AskAnswerLanding.scala:162-166 — 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 `src/main/scala/nebflow/agent/AskAnswerLanding.scala:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/agent/AskAnswerLanding.scala:150— src/main/scala/nebflow/agent/AskAnswerLanding.scala:150-155 | src/main/scala/nebflow/agent/AskAnswerLanding.scala:169-173 — 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 `src/main/scala/nebflow/agent/AskAnswerLanding.scala:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/agent/BackoffSupervisor.scala:965— src/main/scala/nebflow/agent/BackoffSupervisor.scala:965-970 | src/main/scala/nebflow/agent/BgInboxBackstop.scala:29-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/BackoffSupervisor.scala:965` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:141— src/main/scala/nebflow/core/tools/AgentFlowTool.scala:141-145 | src/main/scala/nebflow/core/tools/ChainWriteTool.scala:247-251 — 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 (5 lines × 2) src/main/scala/nebflow/core/tools/BashTool.scala:1004— src/main/scala/nebflow/core/tools/BashTool.scala:1004-1009 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:912-916 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:912` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1744— src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1744-1751 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:851-855 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1744` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/main/scala/nebflow/neblink/PortalWireCodec.scala:433— src/main/scala/nebflow/neblink/PortalWireCodec.scala:433-437 | src/main/scala/nebflow/neblink/PortalWireCodec.scala:466-470 — 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 `src/main/scala/nebflow/neblink/PortalWireCodec.scala:433` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/neblink/PortalWireCodec.scala:471` calls `Some`, `fromString` and `src/main/scala/nebflow/neblink/PortalWireCodec.scala:438` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:306— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:306-310 | src/main/scala/nebflow/neblink/NeblinkClient.scala:349-353 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:794— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:794-798 | src/main/scala/nebflow/neblink/NeblinkClient.scala:942-946 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:659— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:659-663 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:712-716 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:529— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:529-533 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:699-703 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5505— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5505-5509 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:216-220 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6196— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6196-6200 | src/main/scala/nebflow/gateway/StaticRoutes.scala:483-487 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:111— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:111-115 | src/main/scala/nebflow/llm/interface.scala:133-137 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:148— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:148-152 | src/main/scala/nebflow/llm/registry.scala:190-194 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
+ 14 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×39
Async function without AbortSignal: fetchAgents src/main/resources/web/js/agentManager.js:46— `fetchAgents` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchAgentDetail src/main/resources/web/js/agentManager.js:55— `fetchAgentDetail` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchAgentModel src/main/resources/web/js/agentManager.js:63— `fetchAgentModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: stagePreviewDeclaration src/main/resources/web/js/attachUpload.js:506— `stagePreviewDeclaration` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: cancelUpload src/main/resources/web/js/attachUpload.js:567— `cancelUpload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshDataUrl src/main/resources/web/js/avatarCache.js:96— `refreshDataUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchAgentModelBadge src/main/resources/web/js/bgAgentPopup.js:1070— `fetchAgentModelBadge` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: _fetchTts src/main/resources/web/js/chat.js:155— `_fetchTts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: downloadAttachmentFile src/main/resources/web/js/chat.js:2886— `downloadAttachmentFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: apiCall src/main/resources/web/js/daemonPanel.js:233— `apiCall` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: apiCall src/main/resources/web/js/daemons.js:292— `apiCall` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchDaemons src/main/resources/web/js/daemons.js:307— `fetchDaemons` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchDelegateOutput src/main/resources/web/js/delegateApi.js:68— `fetchDelegateOutput` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: openDelegateNative src/main/resources/web/js/delegateApi.js:85— `openDelegateNative` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchDelegateDetail src/main/resources/web/js/delegateApi.js:106— `fetchDelegateDetail` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchDelegateChildren src/main/resources/web/js/delegateApi.js:122— `fetchDelegateChildren` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchArchivedDelegates src/main/resources/web/js/delegateApi.js:138— `fetchArchivedDelegates` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: archiveDelegate src/main/resources/web/js/delegateApi.js:157— `archiveDelegate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: unarchiveDelegate src/main/resources/web/js/delegateApi.js:180— `unarchiveDelegate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchJson src/main/resources/web/js/delegateChainProvider.js:57— `fetchJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getDeviceRoster src/main/resources/web/js/deviceRoster.js:31— `getDeviceRoster` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchFileChanges src/main/resources/web/js/diffView.js:15— `fetchFileChanges` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: saveDeviceDescription src/main/resources/web/js/dropbox.js:376— `saveDeviceDescription` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchExecutors src/main/resources/web/js/executorsPanel.js:23— `fetchExecutors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: renderExecutors src/main/resources/web/js/executorsPanel.js:85— `renderExecutors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:821— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:821-827 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:876-882 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1703— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1703-1709 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:844-850 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1703` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3395— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3395-3401 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:92-98 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3444— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3444-3450 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:162-168 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3626— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3626-3632 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3660-3666 — 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 `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3626` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3657` calls `downField`, `getOrElse` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3623` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4110— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4110-4116 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4161-4167 — 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 `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1170— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1170-1176 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1310-1316 — 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 `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1483— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1483-1489 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1026-1032 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3790— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3790-3796 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1360-1366 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3790` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:342— src/main/scala/nebflow/agent/AgentFrozen.scala:342-348 | src/main/scala/nebflow/agent/AgentIdle.scala:222-228 — 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) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2121— src/main/scala/nebflow/agent/AgentSessionExecution.scala:2121-2127 | src/main/scala/nebflow/agent/AgentSessionExecution.scala:2174-2180 — 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 `src/main/scala/nebflow/agent/AgentSessionExecution.scala:2121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/agent/SubagentCrashRecovery.scala:103— src/main/scala/nebflow/agent/SubagentCrashRecovery.scala:103-109 | src/main/scala/nebflow/core/tools/BlockingSubagent.scala:256-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/SubagentCrashRecovery.scala:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/core/delegate/ChainStore.scala:92— src/main/scala/nebflow/core/delegate/ChainStore.scala:92-98 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:183-189 — 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) src/main/scala/nebflow/core/delegate/DualMode.scala:45— src/main/scala/nebflow/core/delegate/DualMode.scala:45-51 | src/main/scala/nebflow/core/plugin/PluginsConfig.scala:36-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:149— src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:149-155 | src/main/scala/nebflow/core/plugin/PluginDispatchPolicy.scala:240-246 — 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) src/main/scala/nebflow/core/tools/MailTool.scala:1589— src/main/scala/nebflow/core/tools/MailTool.scala:1589-1595 | src/main/scala/nebflow/core/tools/MailTool.scala:1883-1889 — 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 `src/main/scala/nebflow/core/tools/MailTool.scala:1589` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/gateway/ConfigRoutes.scala:189— src/main/scala/nebflow/gateway/ConfigRoutes.scala:189-195 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:218-224 — 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 `src/main/scala/nebflow/gateway/ConfigRoutes.scala:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/gateway/NfTicketStore.scala:148— src/main/scala/nebflow/gateway/NfTicketStore.scala:148-154 | src/main/scala/nebflow/neblink/ConsoleTicketStore.scala:125-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/NfTicketStore.scala:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/gateway/SttService.scala:39— src/main/scala/nebflow/gateway/SttService.scala:39-45 | src/main/scala/nebflow/gateway/TtsService.scala:17-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/SttService.scala:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/gateway/WsAskHandlers.scala:130— src/main/scala/nebflow/gateway/WsAskHandlers.scala:130-136 | src/main/scala/nebflow/gateway/WsAskHandlers.scala:167-173 — 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 `src/main/scala/nebflow/gateway/WsAskHandlers.scala:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:294— src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:294-300 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:337-343 — 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 `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:333` calls `downField`, `getOrElse` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:290` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:216— src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:216-222 | src/main/scala/nebflow/llm/decision/LlmAllocator.scala:149-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3149— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3149-3155 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3171-3177 — 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 `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/scala/nebflow/actor/AgentEvent.scala:344— src/main/scala/nebflow/actor/AgentEvent.scala:344-350 | src/main/scala/nebflow/actor/AgentEvent.scala:355-361 — 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 `src/main/scala/nebflow/actor/AgentEvent.scala:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:585— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:585-591 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:759-765 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:585` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:847— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:847-854 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1001-1008 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:847` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:920— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:920-927 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1085-1092 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:920` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1410— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1410-1417 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1625-1632 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1134— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1134-1141 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1211-1218 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:227— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:227-234 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:258-265 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:364— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:364-371 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:467-474 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1047— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1047-1054 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1613-1620 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1621` calls `serverConfigNode` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1055` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1246— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1246-1253 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1858-1865 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5805— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5805-5812 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:659-666 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6008— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6008-6015 | src/main/scala/nebflow/gateway/FsOps.scala:90-97 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/FsOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1451— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1451-1458 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:992-999 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1451` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2606— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2606-2613 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:483-490 — 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 (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3858— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3858-3865 | src/main/scala/nebflow/gateway/RestApiCtx.scala:291-298 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/RestApiCtx.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/main/scala/nebflow/agent/InteractionHub.scala:783— src/main/scala/nebflow/agent/InteractionHub.scala:783-790 | src/main/scala/nebflow/agent/InteractionHub.scala:876-883 — 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 `src/main/scala/nebflow/agent/InteractionHub.scala:783` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/scala/nebflow/core/wiki/WikiService.scala:291— src/main/scala/nebflow/core/wiki/WikiService.scala:291-298 | src/main/scala/nebflow/core/wiki/WikiService.scala:411-418 — 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 `src/main/scala/nebflow/core/wiki/WikiService.scala:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/scala/nebflow/core/wiki/WikiService.scala:593— src/main/scala/nebflow/core/wiki/WikiService.scala:593-600 | src/main/scala/nebflow/core/wiki/WikiService.scala:639-646 — 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 `src/main/scala/nebflow/core/wiki/WikiService.scala:593` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:588— src/main/scala/nebflow/gateway/WebSocketRoutes.scala:588-595 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:647-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:588` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:678— src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:678-685 | src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:704-711 — 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 `src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:678` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/scala/nebflow/neblink/AgentIdentitySync.scala:151— src/main/scala/nebflow/neblink/AgentIdentitySync.scala:151-158 | src/main/scala/nebflow/neblink/AgentSessionSync.scala:187-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/main/scala/nebflow/social/FeishuScanBind.scala:274— src/main/scala/nebflow/social/FeishuScanBind.scala:274-281 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:250-257 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/social/FeishuScanBind.scala:274` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:953— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:953-960 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:425-432 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:953` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/scala/nebflow/core/secrets/SecretsStore.scala:282— src/main/scala/nebflow/core/secrets/SecretsStore.scala:282-289 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:303-310 — 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 `src/main/scala/nebflow/core/secrets/SecretsStore.scala:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:825— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:825-832 | src/main/scala/nebflow/neblink/NeblinkClient.scala:977-984 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:780— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:780-787 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:835-842 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:450— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:450-457 | src/main/scala/nebflow/core/LlmLogWriter.scala:478-485 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
+ 4 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×28
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:128— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:128-131 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:131-134 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:279— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:279-282 | src/main/scala/nebflow/neblink/NeblinkClient.scala:322-325 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4082— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4082-4085 | src/main/scala/nebflow/gateway/ProviderProbe.scala:193-196 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:624— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:624-627 | src/main/scala/nebflow/core/LlmLogWriter.scala:722-725 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/scala/nebflow/agent/AgentActor.scala:556— src/main/scala/nebflow/agent/AgentActor.scala:556-559 | src/main/scala/nebflow/agent/AgentActor.scala:563-566 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1081— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1081-1084 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1155-1158 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1248— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1248-1251 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1170-1173 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1625— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1625-1628 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1846-1849 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/scala/nebflow/core/tools/EditTool.scala:78— src/main/scala/nebflow/core/tools/EditTool.scala:78-82 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:86-89 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:548— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:548-551 | src/main/scala/nebflow/neblink/NeblinkClient.scala:625-628 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:559— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:559-562 | src/main/scala/nebflow/neblink/NeblinkClient.scala:638-641 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:576— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:576-579 | src/main/scala/nebflow/neblink/NeblinkClient.scala:663-671 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_anim.py:27— src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_anim.py:27-30 | src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_error_static.py:24-28 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1263— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1263-1266 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1186-1193 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:273— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:273-276 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:374-377 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_anim.py:33— src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_anim.py:33-36 | src/main/resources/seed/plugins/visual-report/skills/mathematics/taylor_error_static.py:31-35 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:100— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:100-103 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:137-140 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:495— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:495-498 | src/main/scala/nebflow/core/LlmLogWriter.scala:534-537 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3759— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3759-3762 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1473-1476 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:996— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:996-999 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1170-1173 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:279— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:279-282 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:380-383 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/main/scala/nebflow/core/tools/EditTool.scala:126— src/main/scala/nebflow/core/tools/EditTool.scala:126-129 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:317-320 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1150— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1150-1153 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1736-1739 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5713— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5713-5716 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:555-558 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1109— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1109-1112 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1285-1288 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Swallowed exception (caught, then discarded) src/main/scala/nebflow/Version.scala:40— `case _: Exception` 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) src/main/scala/nebflow/Version.scala:75— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuCredentials.scala:235— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuCredentials.scala:275— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuCredentials.scala:283— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuCredentials.scala:290— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuCredentials.scala:294— `case _: Exception` 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) src/main/scala/nebflow/social/FeishuOutboundAdapter.scala:119— `case _: Throwable` 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) src/main/scala/nebflow/social/FeishuScanBind.scala:352— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:248— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:262— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:276— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:279— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:282— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:439— `case _: Exception` 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) src/main/scala/nebflow/social/SocialChannels.scala:725— `case _: Exception` 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) src/main/scala/nebflow/social/WeixinBindAutoWire.scala:183— `case _: Exception` 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) src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:458— `case _: Exception` 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) src/main/scala/nebflow/social/outbound/ContentClass.scala:60— `case _: Throwable` 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) src/main/scala/nebflow/social/outbound/FileLongShot.scala:120— `case _: Throwable` 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) src/main/scala/nebflow/social/outbound/RichRenderer.scala:437— `case _: Throwable` 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) src/main/scala/nebflow/social/outbound/WebPageShot.scala:145— `case _: Throwable` 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) src/main/scala/nebflow/shared/Branding.scala:242— `case _: Exception` 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) src/main/scala/nebflow/shared/BrowserManager.scala:67— `case _: Exception` 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) src/main/scala/nebflow/shared/BrowserManager.scala:88— `case _: Exception` 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.
+ 3 more in this group — see findings.md.
AC3 · Page structure· Page without a main landmark · ×27
Page without a main landmark bing1.html:1— 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 design/20261006_askuser_redesign/index.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 design/20261006_askuser_redesign/pipeline/_validate/test.html:3— 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 design/20261006_askuser_redesign/style-2/mockup.html:4— 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 design/logo/preview.html:1— 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 reports/20261019_154300_external-executor-detail-mockup__delegate-nebflow-e0b069db.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 reports/20261019_171617_coldstart-loading-card-mockup__delegate-nebflow-cae4c10b.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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.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 reports/20261019_205500_login-init-card__delegate-nebflow-ebb295ef.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 reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.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 reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.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 reports/20261020_211500_mobile-mockup-375-v2__delegate-nebflow-74eb4637.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 reports/20261020_214500_mobile-mockup-375-v3__delegate-nebflow-74eb4637.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 reports/20261021_025933_mobile-mockup-375-v3.5__delegate-nebflow-74eb4637.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 reports/20261023_195528_delegate-fullflow-audit.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 reports/20261025_102642_mail-perception-design/card-otp-ask.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 reports/20261025_102642_mail-perception-design/card-send-confirm.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 reports/20261025_102642_mail-perception-design/panel-perception.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 reports/20261025_115023_mail-perception-design-r2/card-otp-ask.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 reports/20261025_115023_mail-perception-design-r2/card-send-confirm.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 reports/20261025_115023_mail-perception-design-r2/panel-perception.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 reports/20261025_141024_mail-perception-design-r3/card-otp-ask.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 reports/20261025_141024_mail-perception-design-r3/card-send-confirm.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 reports/20261025_141024_mail-perception-design-r3/panel-perception.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 reports/20261027_220000_mobile-canvas-ux/mockup.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
+ 2 more in this group — see findings.md.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×26
Animation without a prefers-reduced-motion guard reports/20261019_154300_external-executor-detail-mockup__delegate-nebflow-e0b069db.html:164— `.spin` moves (`animation: rot 0.9s linear infinite`) 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 reports/20261019_171617_coldstart-loading-card-mockup__delegate-nebflow-cae4c10b.html:95— `.boot-step.active .dot::after` moves (`animation: spin .8s linear infinite`) 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 reports/20261019_171617_coldstart-loading-card-mockup__delegate-nebflow-cae4c10b.html:122— `.sk-bar` moves (`animation: shimmer 1.3s ease infinite`) 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:194— `.wbtn` moves (`transition: background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .1s 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:213— `.dd-face .chev` moves (`transition: transform .15s 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:225— `.dd.open .dd-pop` moves (`animation: ddIn .14s 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:247— `.zbtn` moves (`transition: background .15s,transform .1s ease,outline-color .15s`) 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:268— `.demo-side` moves (`transition: opacity .2s,transform .2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:272— `.deck-btn` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, box-shadow 0.18s 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 reports/20261019_220500_canvas-card-stack-mockup__delegate-nebflow-19bc02b5.html:484— `#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:276— `.deck-fab` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease,
opacity 0.18s ease, box-shadow 0.18s 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 reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:496— `#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:272— `.deck-fab` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease,
opacity 0.18s ease, box-shadow 0.18s 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 reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:332— `.face.restore` moves (`transition: transform 0.32s cubic-bezier(0.3, 1.25, 0.6, 1), opacity 0.28s 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 reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:508— `#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:266— `.cpanel.restore` moves (`transition: transform 0.32s cubic-bezier(0.3, 1.25, 0.6, 1), opacity 0.28s 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 reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:316— `.deck-fab` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease,
opacity 0.18s ease, box-shadow 0.18s 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 reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:503— `#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:271— `.cpanel.restore` moves (`transition: transform 0.32s cubic-bezier(0.3, 1.25, 0.6, 1), opacity 0.28s 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 reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:322— `.deck-fab` moves (`transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease,
opacity 0.18s ease, box-shadow 0.18s 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 reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:512— `#toast` moves (`transition: opacity 0.2s ease, transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:62— `.zone` moves (`transition: right .22s var(--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 reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:100— `.sheet` moves (`transition: transform .26s var(--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 reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:119— `.chain .mem .st.run` moves (`animation: spin 1s linear infinite`) 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 reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:169— `.rbar` moves (`transition: width .22s var(--ease),padding .22s var(--ease),border-radius .22s var(--ease),opacity .22s`) 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.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1611— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1611-1622 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1832-1843 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:97— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:97-108 | src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:127-138 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` and `src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:838— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:838-849 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:893-904 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:905— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:905-916 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:960-971 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:603— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:603-614 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:779-790 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1162— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1162-1173 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1748-1759 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2060— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2060-2071 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:908-919 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2146— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2146-2157 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1024-1035 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3429— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3429-3440 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:140-151 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3568— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3568-3579 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:294-305 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4454— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4454-4465 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2312-2323 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5513— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5513-5524 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:224-235 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:274— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:274-285 | src/main/scala/nebflow/shared/config.scala:596-607 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala` and `src/main/scala/nebflow/shared/config.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:274` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:56— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:56-67 | src/main/scala/nebflow/llm/registry.scala:66-77 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/main/scala/nebflow/agent/AgentFinishTurn.scala:447— src/main/scala/nebflow/agent/AgentFinishTurn.scala:447-458 | src/main/scala/nebflow/agent/AgentFinishTurn.scala:538-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/main/scala/nebflow/core/compact/CompactUtils.scala:176— src/main/scala/nebflow/core/compact/CompactUtils.scala:176-187 | src/main/scala/nebflow/core/compact/FullCompact.scala:298-309 — 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 (12 lines × 2) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:69— src/main/scala/nebflow/core/tools/AgentFlowTool.scala:69-80 | src/main/scala/nebflow/core/tools/ChainWriteTool.scala:105-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AgentFlowTool.scala:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/main/scala/nebflow/core/tools/DelegateReportTool.scala:61— src/main/scala/nebflow/core/tools/DelegateReportTool.scala:61-72 | src/main/scala/nebflow/core/tools/NodeReportTool.scala:197-208 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/DelegateReportTool.scala:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1114— src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1114-1125 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1131-1142 — 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 `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/main/scala/nebflow/neblink/AgentIdentitySync.scala:205— src/main/scala/nebflow/neblink/AgentIdentitySync.scala:205-216 | src/main/scala/nebflow/neblink/AgentSessionSync.scala:249-260 — 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 (12 lines × 2) src/main/scala/nebflow/neblink/FileTransferAction.scala:59— src/main/scala/nebflow/neblink/FileTransferAction.scala:59-70 | src/main/scala/nebflow/neblink/FileTransferAction.scala:143-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/main/scala/nebflow/shared/MemoryStore.scala:193— src/main/scala/nebflow/shared/MemoryStore.scala:193-204 | src/main/scala/nebflow/shared/RulesStore.scala:62-73 — 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 (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:144— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:144-155 | src/main/scala/nebflow/llm/interface.scala:170-181 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/main/scala/nebflow/gateway/WsAskHandlers.scala:123— src/main/scala/nebflow/gateway/WsAskHandlers.scala:123-134 | src/main/scala/nebflow/gateway/WsAskHandlers.scala:209-220 — 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 `src/main/scala/nebflow/gateway/WsAskHandlers.scala:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1316— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1316-1327 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1526-1537 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:321— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:321-330 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:423-432 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:321` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2636— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2636-2645 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:263-272 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3382— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3382-3391 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:72-81 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3462— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3462-3471 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:187-196 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3462` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3473— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3473-3482 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:198-207 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3473` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3995— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3995-4004 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:626-635 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5697— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5697-5706 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:536-545 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6221— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6221-6230 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6303-6312 — 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 `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:928— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:928-937 | src/main/scala/nebflow/core/LlmLogWriter.scala:1049-1058 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1113— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1113-1122 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:613-622 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4718— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4718-4727 | src/main/scala/nebflow/gateway/RestApiCtx.scala:361-370 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/RestApiCtx.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:315— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:315-324 | src/main/scala/nebflow/llm/fallback.scala:459-468 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala` and `src/main/scala/nebflow/llm/fallback.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:156— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:156-165 | src/main/scala/nebflow/llm/registry.scala:198-207 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/scala/nebflow/core/tools/DeviceProfile.scala:523— src/main/scala/nebflow/core/tools/DeviceProfile.scala:523-532 | src/main/scala/nebflow/core/tools/PointerPickup.scala:85-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/DeviceProfile.scala:523` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) src/main/scala/nebflow/core/tools/TeamTaskCreateTool.scala:79— src/main/scala/nebflow/core/tools/TeamTaskCreateTool.scala:79-88 | src/main/scala/nebflow/core/tools/TeamTaskUpdateTool.scala:137-146 — 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 (10 lines × 2) src/main/scala/nebflow/core/tools/WebFetchTool.scala:112— src/main/scala/nebflow/core/tools/WebFetchTool.scala:112-121 | src/main/scala/nebflow/shared/http.scala:98-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/WebFetchTool.scala:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/scala/nebflow/dropbox/ChunkedTransfer.scala:266— src/main/scala/nebflow/dropbox/ChunkedTransfer.scala:266-275 | src/main/scala/nebflow/neblink/FileTransferAction.scala:275-284 — 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 (10 lines × 2) src/main/scala/nebflow/gateway/PresenceRoutes.scala:1604— src/main/scala/nebflow/gateway/PresenceRoutes.scala:1604-1613 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1737-1746 — 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 `src/main/scala/nebflow/gateway/PresenceRoutes.scala:1604` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/scala/nebflow/neblink/PortalWireCodec.scala:257— src/main/scala/nebflow/neblink/PortalWireCodec.scala:257-266 | src/main/scala/nebflow/neblink/PortalWireCodec.scala:293-302 — 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 `src/main/scala/nebflow/neblink/PortalWireCodec.scala:257` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4765— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4765-4774 | src/main/scala/nebflow/gateway/SocialRoutes.scala:1024-1033 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/main/scala/nebflow/agent/AgentActor.scala:249— src/main/scala/nebflow/agent/AgentActor.scala:249-258 | src/main/scala/nebflow/agent/AgentActor.scala:270-279 — 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) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:331— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:331-340 | src/main/scala/nebflow/neblink/NeblinkClient.scala:376-385 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:453— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:453-461 | src/main/scala/nebflow/neblink/NeblinkClient.scala:515-523 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1566— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1566-1574 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1785-1793 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:972— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:972-980 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1044-1052 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:249— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:249-257 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:280-288 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:249` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:80— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:80-88 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:117-125 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4523— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4523-4531 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2399-2411 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) src/main/scala/nebflow/core/Guardrails.scala:50— src/main/scala/nebflow/core/Guardrails.scala:50-58 | src/main/scala/nebflow/core/compact/PingpongConfig.scala:27-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/Guardrails.scala:50` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/core/Guardrails.scala:42` calls `Set` and `src/main/scala/nebflow/core/compact/PingpongConfig.scala:22` 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 (9 lines × 2) src/main/scala/nebflow/core/wiki/WikiService.scala:429— src/main/scala/nebflow/core/wiki/WikiService.scala:429-437 | src/main/scala/nebflow/core/wiki/WikiService.scala:446-454 — 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 `src/main/scala/nebflow/core/wiki/WikiService.scala:429` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:223— src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:223-231 | src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:352-360 — 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) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:364— src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:364-372 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:657-665 — 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 `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:364` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2563— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2563-2571 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:78-86 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2563` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/main/scala/nebflow/core/executor/ExternalOutputStore.scala:164— src/main/scala/nebflow/core/executor/ExternalOutputStore.scala:164-172 | src/main/scala/nebflow/core/tools/BgTaskOutputStore.scala:261-269 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/executor/ExternalOutputStore.scala:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4197— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4197-4205 | src/main/scala/nebflow/gateway/WsDropboxHandlers.scala:181-189 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsDropboxHandlers.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:293— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:293-301 | src/main/scala/nebflow/shared/config.scala:615-623 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala` and `src/main/scala/nebflow/shared/config.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:795— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:795-803 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:850-858 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/main/scala/nebflow/gateway/StaticRoutes.scala:794— src/main/scala/nebflow/gateway/StaticRoutes.scala:794-802 | src/main/scala/nebflow/gateway/StaticRoutes.scala:831-839 — 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) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1174— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1174-1182 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1372-1380 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1174` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1209— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1209-1217 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1799-1807 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:622— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:622-630 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:675-683 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/main/scala/nebflow/social/WeixinIngressToken.scala:146— src/main/scala/nebflow/social/WeixinIngressToken.scala:146-154 | src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:215-223 — 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) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:289— src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:289-297 | src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:495-503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:709— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:709-719 | src/main/scala/nebflow/neblink/NeblinkClient.scala:818-828 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:709` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:237— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:237-247 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:268-278 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:502— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:502-512 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:668-678 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1136— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1136-1146 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1722-1732 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3524— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3524-3534 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:220-230 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3555— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3555-3565 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:270-280 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5764— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5764-5774 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:614-624 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5764` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:501— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:501-511 | src/main/scala/nebflow/core/LlmLogWriter.scala:540-550 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2497— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2497-2507 | src/main/scala/nebflow/gateway/RestApiCtx.scala:197-207 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/RestApiCtx.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2999— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2999-3009 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1470-1480 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2999` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/scala/nebflow/agent/AgentActor.scala:1979— src/main/scala/nebflow/agent/AgentActor.scala:1979-1989 | src/main/scala/nebflow/agent/AgentIdle.scala:304-314 — 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, `src/main/scala/nebflow/agent/AgentActor.scala:1970` calls `emitStream`, `touchRegistryActivity` and `src/main/scala/nebflow/agent/AgentIdle.scala:301` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:55— src/main/scala/nebflow/core/tools/AgentFlowTool.scala:55-65 | src/main/scala/nebflow/core/tools/ChainWriteTool.scala:89-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AgentFlowTool.scala:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/scala/nebflow/core/tools/BashTool.scala:1320— src/main/scala/nebflow/core/tools/BashTool.scala:1320-1330 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1017-1027 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1017` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:91— src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:91-101 | src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:132-142 — 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 `src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:102` calls `Some` and `src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:143` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/main/scala/nebflow/gateway/RefResolver.scala:63— src/main/scala/nebflow/gateway/RefResolver.scala:63-73 | src/main/scala/nebflow/gateway/RefResolver.scala:75-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/RefResolver.scala:90` calls `sanitize`, `downField`, `getOrElse` and `src/main/scala/nebflow/gateway/RefResolver.scala:75` 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2075— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2075-2085 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:930-940 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2075` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1794— src/main/scala/nebflow/agent/AgentSessionExecution.scala:1794-1804 | src/main/scala/nebflow/agent/AgentSessionExecution.scala:1932-1942 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4176— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4176-4186 | src/main/scala/nebflow/gateway/RestApiCtx.scala:330-340 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/RestApiCtx.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:93— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:93-103 | src/main/scala/nebflow/gateway/HealthRoutes.scala:119-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:93` 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.
No assertions: shots[${tag}] collapsed one-row card / expanded detail tests/jev-panel-threefix.spec.mjs:323— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: G5 顶栏整排 before(legacy)/after × 明暗 + after 开面板全景 tests/perception-btn-ghost.spec.mjs:261— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: evidence:重连后 DOM 截图(人工可读的复现帧) tests/reconnect-collapse.spec.mjs:426— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: T7 修复验证截图(亮暗双主题)落盘 docs/Nebflow tests/reftag-redesign.spec.mjs:267— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: shots[${tag}] jev card (masked + health down) / entry row / panel rows tests/secrets-ui-redesign.spec.mjs:497— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: shots[${tag}] settings full + account block closeup + avatar dual state tests/settings-cleanup.spec.mjs:398— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: 三面截图:暗亮双主题(面A 弹层五态 / 面B 远端浏览+取件失败 / 面C 三卡徽标) tests/ui-device-faces-shots.spec.mjs:137— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: ${scheme} · 段落快照小窗截图 tests/wiki-graph-paragraph.spec.mjs:322— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: panel-run-light+dark reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:124— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: panel-setup-light reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:140— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: panel-error-auth+conn reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:148— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: panel-collapsed-light reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:164— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: panel-config-light+adv reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:174— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: otp-chip+filled reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:187— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: snapshot+receipt reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:207— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: canvas-light+dark reports/20261027_054745_mail-perception-r3-land/shots.spec.mjs:224— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: probe: delegate chain completed-node detail network face evidence/20261020_084534_chain-detail-diff-fix/network-probe.spec.mjs:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×14
Edited copy of a member (3 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5549— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5549-5551 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:264-266 — 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) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:157— src/main/scala/nebflow/core/tools/AgentFlowTool.scala:157-159 | src/main/scala/nebflow/core/tools/ChainWriteTool.scala:136-138 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:182— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:182-184 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:200-202 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4161— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4161-4163 | src/main/scala/nebflow/gateway/RestApiCtx.scala:313-315 — 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) src/main/scala/nebflow/core/tools/DelegateReportTool.scala:75— src/main/scala/nebflow/core/tools/DelegateReportTool.scala:75-77 | src/main/scala/nebflow/core/tools/NodeReportTool.scala:211-213 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:239— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:239-241 | src/main/scala/nebflow/llm/fallback.scala:382-384 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:171— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:171-173 | src/main/scala/nebflow/llm/interface.scala:199-201 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:288— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:288-290 | src/main/scala/nebflow/shared/config.scala:610-612 — 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) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:772— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:772-774 | src/main/scala/nebflow/neblink/NeblinkClient.scala:884-886 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:279— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:279-281 | src/main/scala/nebflow/llm/interface.scala:326-328 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6153— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6153-6155 | src/main/scala/nebflow/gateway/StaticRoutes.scala:213-215 — 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) src/main/scala/nebflow/core/tools/WebFetchTool.scala:83— src/main/scala/nebflow/core/tools/WebFetchTool.scala:83-85 | src/main/scala/nebflow/shared/PlaywrightFetcher.scala:144-146 — 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) src/main/scala/nebflow/gateway/NfServeGate.scala:105— src/main/scala/nebflow/gateway/NfServeGate.scala:105-107 | src/main/scala/nebflow/gateway/NfTicketStore.scala:199-201 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2362— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2362-2364 | src/main/scala/nebflow/gateway/RestApiCtx.scala:138-140 — 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.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:418— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:418-431 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:522-535 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1920— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1920-1933 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:390-403 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1920` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3018— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3018-3031 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1102-1115 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3018` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1101` calls `invalidated` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3017` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3684— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3684-3697 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:362-375 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3684` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:529— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:529-542 | src/main/scala/nebflow/core/LlmLogWriter.scala:568-581 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:529` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:606— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:606-619 | src/main/scala/nebflow/core/LlmLogWriter.scala:704-717 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2386— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2386-2399 | src/main/scala/nebflow/gateway/RestApiCtx.scala:163-176 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/RestApiCtx.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/main/scala/nebflow/agent/AgentFinishTurn.scala:712— src/main/scala/nebflow/agent/AgentFinishTurn.scala:712-725 | src/main/scala/nebflow/agent/AgentIdle.scala:990-1003 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentFinishTurn.scala:712` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/main/scala/nebflow/core/SchemePolicy.scala:118— src/main/scala/nebflow/core/SchemePolicy.scala:118-131 | src/main/scala/nebflow/core/presets/PresetStore.scala:310-323 — 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 (14 lines × 2) src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:54— src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:54-67 | src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:111-124 — 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 `src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:286— src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:286-299 | src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:313-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2226— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2226-2239 | src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala:56-69 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2428— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2428-2441 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:429-442 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3038— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3038-3051 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1129-1142 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3038` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:219— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:219-234 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:258-273 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:393— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:393-408 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:497-512 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:443— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:443-458 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:548-563 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4009— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4009-4024 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:647-662 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4545— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4545-4560 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2427-2442 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5904— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5904-5919 | src/main/scala/nebflow/gateway/NfFileRoutes.scala:367-382 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5904` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:467— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:467-482 | src/main/scala/nebflow/core/LlmLogWriter.scala:497-512 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:642— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:642-657 | src/main/scala/nebflow/gateway/RegistryRoutes.scala:151-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:642` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:258— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:258-273 | src/main/scala/nebflow/llm/interface.scala:289-304 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/main/scala/nebflow/agent/AgentIdle.scala:585— src/main/scala/nebflow/agent/AgentIdle.scala:585-600 | src/main/scala/nebflow/agent/AgentIdle.scala:847-862 — 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) src/main/scala/nebflow/gateway/TextStream.scala:384— src/main/scala/nebflow/gateway/TextStream.scala:384-399 | src/main/scala/nebflow/gateway/TextStream.scala:418-433 — 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) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:683— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:683-698 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:736-751 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5654— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5654-5669 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:356-371 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/NfFilePolicy.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1024— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1024-1040 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1565-1581 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3341— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3341-3357 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1289-1305 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1027— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1027-1043 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:499-515 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1313— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1313-1329 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:837-853 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586-2602 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:448-464 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3966— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3966-3982 | src/main/scala/nebflow/gateway/ProviderProbe.scala:59-75 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ProviderProbe.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:304— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:304-320 | src/main/scala/nebflow/shared/config.scala:626-642 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala` and `src/main/scala/nebflow/shared/config.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) src/main/scala/nebflow/core/index/EmbeddingService.scala:101— src/main/scala/nebflow/core/index/EmbeddingService.scala:101-117 | src/main/scala/nebflow/llm/decision/JevSettings.scala:101-117 — 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 (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1383— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1383-1399 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1596-1612 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1383` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3247— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3247-3263 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:268-284 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) src/main/scala/nebflow/core/delegate/MergeQueue.scala:659— src/main/scala/nebflow/core/delegate/MergeQueue.scala:659-675 | src/main/scala/nebflow/core/delegate/MergeQueue.scala:688-704 — 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 `src/main/scala/nebflow/core/delegate/MergeQueue.scala:659` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1068— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1068-1086 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1244-1260 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1582— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1582-1596 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1802-1816 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:171— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:171-185 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:210-224 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3639— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3639-3653 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:308-322 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3639` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:78— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:78-92 | src/main/scala/nebflow/llm/registry.scala:98-112 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:127— src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:127-141 | src/main/scala/nebflow/neblink/PortalUplinkBackpressure.scala:262-276 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) src/main/scala/nebflow/gateway/PresenceRoutes.scala:1605— src/main/scala/nebflow/gateway/PresenceRoutes.scala:1605-1619 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1651-1665 — 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 `src/main/scala/nebflow/gateway/PresenceRoutes.scala:1605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/main/scala/nebflow/social/FeishuScanBind.scala:338— src/main/scala/nebflow/social/FeishuScanBind.scala:338-352 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:444-458 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3606— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3606-3620 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1339-1353 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2445— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2445-2459 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:453-467 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1336— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1336-1350 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1546-1560 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:327— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:327-341 | src/main/scala/nebflow/llm/interface.scala:361-375 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5932— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5932-5946 | src/main/scala/nebflow/gateway/NfFileRoutes.scala:403-417 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5932` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:521— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:521-533 | src/main/scala/nebflow/neblink/NeblinkClient.scala:598-610 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:521` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:746— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:746-758 | src/main/scala/nebflow/neblink/NeblinkClient.scala:856-868 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1180— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1180-1192 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1766-1778 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1180` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5246— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5246-5258 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3194-3206 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3290— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3290-3302 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:2038-2050 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:325— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:325-337 | src/main/scala/nebflow/shared/config.scala:659-671 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala` and `src/main/scala/nebflow/shared/config.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:350— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala:350-362 | src/main/scala/nebflow/shared/config.scala:684-696 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/config.scala` and `src/main/scala/nebflow/shared/config.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:575— src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:575-587 | src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:477-489 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:575` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:574` calls `header` and `src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:476` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) src/main/scala/nebflow/social/FeishuScanBind.scala:170— src/main/scala/nebflow/social/FeishuScanBind.scala:170-182 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:160-172 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2541— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2541-2553 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:577-589 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4100— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4100-4112 | src/main/scala/nebflow/gateway/WsDropboxHandlers.scala:57-69 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsDropboxHandlers.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1091— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1091-1103 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1166-1178 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Swallowed exception (empty catch) src/main/scala/nebflow/social/FeishuChannel.scala:375— 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) src/main/scala/nebflow/social/FeishuChannel.scala:398— 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) src/main/scala/nebflow/social/SocialChannels.scala:372— 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) src/main/scala/nebflow/social/WeixinIngressToken.scala:94— 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) src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:194— 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) src/main/scala/nebflow/shared/PlaywrightFetcher.scala:170— 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) src/main/scala/nebflow/shared/PlaywrightFetcher.scala:232— 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) src/main/scala/nebflow/shared/PlaywrightFetcher.scala:237— 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) src/main/scala/nebflow/shared/PlaywrightFetcher.scala:250— 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) src/main/scala/nebflow/service/ConfigSnapshot.scala: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) src/main/scala/nebflow/service/NebflowBackup.scala:118— 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) src/main/scala/nebflow/perception/MailClient.scala:159— 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×11
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2678— src/main/scala/nebflow/agent/AgentSessionExecution.scala:2678-2685 | src/main/scala/nebflow/core/tools/ProjectTool.scala:129-139 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/agent/AgentSessionExecution.scala:529— src/main/scala/nebflow/agent/AgentSessionExecution.scala:529-536 | src/main/scala/nebflow/agent/PromptSections.scala:855-863 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/social/FeishuScanBind.scala:151— src/main/scala/nebflow/social/FeishuScanBind.scala:151-158 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:139-148 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:700— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:700-707 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:876-883 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/cli/UpdateStage.scala:67— src/main/scala/nebflow/cli/UpdateStage.scala:67-74 | src/main/scala/nebflow/core/hotupdate/RemoteUpdateAction.scala:159-166 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:157— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:157-164 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:171-178 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1526— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1526-1537 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:2190-2197 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/core/tools/MailTool.scala:956— src/main/scala/nebflow/core/tools/MailTool.scala:956-963 | src/main/scala/nebflow/core/tools/NodeReportTool.scala:335-342 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/perception/PerceptionStore.scala:107— src/main/scala/nebflow/perception/PerceptionStore.scala:107-114 | src/main/scala/nebflow/perception/PerceptionStore.scala:146-154 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/agent/AgentStreamPipelines.scala:89— src/main/scala/nebflow/agent/AgentStreamPipelines.scala:89-96 | src/main/scala/nebflow/agent/AgentStreamPipelines.scala:105-123 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/main/scala/nebflow/core/tools/RelayExecAudit.scala:160— src/main/scala/nebflow/core/tools/RelayExecAudit.scala:160-167 | src/main/scala/nebflow/gateway/StaticRoutes.scala:380-387 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×11
Edited copy of a member (5 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:191— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:191-196 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:218-222 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/agent/AskUserAnswerBridge.scala:70— src/main/scala/nebflow/agent/AskUserAnswerBridge.scala:70-81 | src/main/scala/nebflow/agent/SendConfirm.scala:207-211 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/llm/imagegen/ImageGenAdapters.scala:78— src/main/scala/nebflow/llm/imagegen/ImageGenAdapters.scala:78-82 | src/main/scala/nebflow/llm/imagegen/ImageGenAdapters.scala:103-107 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/core/reminders.scala:359— src/main/scala/nebflow/core/reminders.scala:359-363 | src/main/scala/nebflow/core/reminders.scala:453-457 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:148— src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:148-154 | src/main/scala/nebflow/neblink/PortalUplinkBackpressure.scala:283-287 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/llm/decision/LayaProvider.scala:36— src/main/scala/nebflow/llm/decision/LayaProvider.scala:36-40 | src/main/scala/nebflow/llm/decision/TypesafeJevProvider.scala:29-34 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3891— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3891-3895 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1500-1506 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2564— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2564-2568 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1273-1279 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/gateway/NfServeGate.scala:112— src/main/scala/nebflow/gateway/NfServeGate.scala:112-116 | src/main/scala/nebflow/gateway/NfTicketStore.scala:226-230 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/core/processor/FreezeScheduler.scala:34— src/main/scala/nebflow/core/processor/FreezeScheduler.scala:34-38 | src/main/scala/nebflow/core/processor/HeldDeliveryWatchdog.scala:78-82 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/main/scala/nebflow/neblink/FriendService.scala:248— src/main/scala/nebflow/neblink/FriendService.scala:248-252 | src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1716-1720 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×10
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/core/mcp/transports.scala:97— src/main/scala/nebflow/core/mcp/transports.scala:97-112 | src/main/scala/nebflow/core/mcp/transports.scala:315-323 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/social/SocialChannels.scala:664— src/main/scala/nebflow/social/SocialChannels.scala:664-672 | src/main/scala/nebflow/social/SocialChannels.scala:704-712 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1208— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1208-1218 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1799-1807 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/core/tools/ScheduleTool.scala:422— src/main/scala/nebflow/core/tools/ScheduleTool.scala:422-430 | src/main/scala/nebflow/core/tools/ScheduleTool.scala:436-447 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:270— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:270-278 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:302-311 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/cli/StopSupport.scala:34— src/main/scala/nebflow/cli/StopSupport.scala:34-56 | src/main/scala/nebflow/gateway/StaleProcessGuard.scala:122-130 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/cli/uiStore.scala:156— src/main/scala/nebflow/cli/uiStore.scala:156-164 | src/main/scala/nebflow/cli/uiStore.scala:167-177 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/neblink/DeviceCredentialStore.scala:334— src/main/scala/nebflow/neblink/DeviceCredentialStore.scala:334-342 | src/main/scala/nebflow/neblink/NeblinkModel.scala:470-478 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/scala/nebflow/neblink/FriendService.scala:1887— src/main/scala/nebflow/neblink/FriendService.scala:1887-1898 | src/main/scala/nebflow/neblink/FriendService.scala:1946-1954 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/resources/seed/plugins/visual-report/skills/core/references/demos/education-motion-src/rc_schematic.py:54— src/main/resources/seed/plugins/visual-report/skills/core/references/demos/education-motion-src/rc_schematic.py:54-62 | src/main/resources/seed/plugins/visual-report/skills/core/references/demos/education-motion-src/rc_static_steps.py:130-142 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×10
Edited copy of a member (11 corresponding lines) src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:267— src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:267-277 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:593-604 — 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) src/main/scala/nebflow/gateway/WindowsProcs.scala:80— src/main/scala/nebflow/gateway/WindowsProcs.scala:80-94 | src/main/scala/nebflow/gateway/WindowsProcs.scala:98-108 — 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) src/main/scala/nebflow/core/tools/EditTool.scala:85— src/main/scala/nebflow/core/tools/EditTool.scala:85-95 | src/main/scala/nebflow/core/tools/WriteTool.scala:56-66 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:581— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:581-591 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:755-765 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6178— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6178-6192 | src/main/scala/nebflow/gateway/StaticRoutes.scala:264-274 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:184— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:184-194 | src/main/scala/nebflow/llm/registry.scala:240-254 — 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) src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:275— src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:275-285 | src/main/scala/nebflow/core/secrets/SecretsCatalog.scala:234-245 — 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) src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:603— src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:603-613 | src/main/scala/nebflow/core/device/DeviceHmac.scala:157-172 — 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) src/main/scala/nebflow/perception/PerceptionStore.scala:84— src/main/scala/nebflow/perception/PerceptionStore.scala:84-94 | src/main/scala/nebflow/perception/PerceptionStore.scala:208-218 — 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) src/main/scala/nebflow/core/tools/TaskToolHelper.scala:17— src/main/scala/nebflow/core/tools/TaskToolHelper.scala:17-27 | src/main/scala/nebflow/core/tools/TaskToolHelper.scala:38-48 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×10
Edited copy of a member (6 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6331— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6331-6338 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3243-3248 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4643— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4643-4649 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2525-2530 — 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) src/main/scala/nebflow/core/hotrestart/SuccessorGate.scala:101— src/main/scala/nebflow/core/hotrestart/SuccessorGate.scala:101-107 | src/main/scala/nebflow/core/hotupdate/Rollback.scala:132-137 — 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) src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:1327— src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:1327-1337 | src/main/scala/nebflow/core/flow/EphemeralAgentRunner.scala:144-149 — 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) src/main/scala/nebflow/core/daemon/DaemonService.scala:156— src/main/scala/nebflow/core/daemon/DaemonService.scala:156-161 | src/main/scala/nebflow/core/daemon/DaemonService.scala:358-365 — 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) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:892— src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:892-901 | src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:906-911 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3777— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3777-3782 | src/main/scala/nebflow/gateway/RestApiCtx.scala:231-236 — 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) src/main/scala/nebflow/core/entity/EntityLoader.scala:398— src/main/scala/nebflow/core/entity/EntityLoader.scala:398-403 | src/main/scala/nebflow/core/hotrestart/InstallPointer.scala:85-91 — 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) src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:204— src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:204-209 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:522-532 — 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) src/main/scala/nebflow/llm/decision/LayaProvider.scala:102— src/main/scala/nebflow/llm/decision/LayaProvider.scala:102-111 | src/main/scala/nebflow/llm/decision/TypesafeJevProvider.scala:50-55 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:332— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:332-350 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:434-452 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:332` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1946— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1946-1964 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:426-444 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2124— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2124-2142 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:995-1013 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3115— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3115-3133 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1213-1231 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3115` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1212` calls `invalidated` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3114` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:795— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:795-813 | src/main/scala/nebflow/core/LlmLogWriter.scala:903-921 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3702— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3702-3720 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:387-405 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3702` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:891— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:891-909 | src/main/scala/nebflow/core/LlmLogWriter.scala:1008-1026 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2992— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2992-3010 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1074-1092 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2992` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:680— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:680-698 | src/main/scala/nebflow/core/LlmLogWriter.scala:778-796 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2654— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2654-2672 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:294-312 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2654` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:112— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:112-129 | src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:142-159 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` and `src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:505— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:505-522 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:539-556 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:151— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:151-168 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:190-207 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:192— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:192-209 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:231-248 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:617— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:617-634 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:793-810 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1781— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1781-1798 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:201-218 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1781` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3053— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3053-3070 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1144-1161 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3053` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:587— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:587-604 | src/main/scala/nebflow/core/LlmLogWriter.scala:685-702 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1900— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1900-1917 | src/main/scala/nebflow/gateway/SocialRoutes.scala:416-433 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1900` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4208— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4208-4225 | src/main/scala/nebflow/gateway/WsDropboxHandlers.scala:200-217 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsDropboxHandlers.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×9
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:764— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:764-814 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:740-807 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/core/OnboardingArtifacts.scala:277— src/main/scala/nebflow/core/OnboardingArtifacts.scala:277-288 | src/main/scala/nebflow/core/entity/BuiltinAgents.scala:99-110 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:216— src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:216-227 | src/main/scala/nebflow/llm/decision/LlmAllocator.scala:161-172 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:294— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:294-307 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:396-407 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3699— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3699-3710 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:2443-2455 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/agent/CompactionQueueStore.scala:184— src/main/scala/nebflow/agent/CompactionQueueStore.scala:184-195 | src/main/scala/nebflow/core/flow/TurnStateStore.scala:73-84 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/core/flow/FlowMailStore.scala:79— src/main/scala/nebflow/core/flow/FlowMailStore.scala:79-90 | src/main/scala/nebflow/core/flow/MailQueueStore.scala:68-79 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:789— src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:789-800 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:808-824 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:42— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:42-53 | src/main/scala/nebflow/llm/registry.scala:48-63 — 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 (18 corresponding lines) · ×9
Edited copy of a member (18 corresponding lines) src/main/scala/nebflow/social/FeishuScanBind.scala:170— src/main/scala/nebflow/social/FeishuScanBind.scala:170-187 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:160-177 — 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.
Edited copy of a member (18 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:453— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:453-470 | src/main/scala/nebflow/neblink/NeblinkClient.scala:515-545 — 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.
Edited copy of a member (18 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:597— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:597-614 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:773-790 — 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.
Edited copy of a member (18 corresponding lines) src/main/scala/nebflow/core/tools/DelegateTool.scala:171— src/main/scala/nebflow/core/tools/DelegateTool.scala:171-188 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:218-238 — 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.
Edited copy of a member (18 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:80— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:80-97 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:111-134 — 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.
Edited copy of a member (18 corresponding lines) src/main/scala/nebflow/core/tools/BashTool.scala:1273— src/main/scala/nebflow/core/tools/BashTool.scala:1273-1291 | src/main/scala/nebflow/core/tools/BgNotifyDelivery.scala:366-383 — 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.
Edited copy of a member (18 corresponding lines) src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:88— src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:88-105 | src/main/scala/nebflow/llm/decision/JevAllocator.scala:101-127 — 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.
Edited copy of a member (18 corresponding lines) src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:127— src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:127-144 | src/main/scala/nebflow/neblink/PortalUplinkBackpressure.scala:262-279 — 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.
Edited copy of a member (18 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4234— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4234-4251 | src/main/scala/nebflow/gateway/AuthRoutes.scala:112-134 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×9
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/core/tools/MailTool.scala:1073— src/main/scala/nebflow/core/tools/MailTool.scala:1073-1102 | src/main/scala/nebflow/core/tools/MailTool.scala:1119-1131 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/gateway/StaticRoutes.scala:794— src/main/scala/nebflow/gateway/StaticRoutes.scala:794-806 | src/main/scala/nebflow/gateway/StaticRoutes.scala:831-843 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:178— src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:178-190 | src/main/scala/nebflow/core/plugin/PluginDispatchPolicy.scala:277-290 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/gateway/connguard.scala:371— src/main/scala/nebflow/gateway/connguard.scala:371-383 | src/main/scala/nebflow/gateway/connguard.scala:509-521 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/neblink/FriendService.scala:955— src/main/scala/nebflow/neblink/FriendService.scala:955-967 | src/main/scala/nebflow/neblink/FriendService.scala:1154-1166 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:476— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:476-488 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:583-595 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/scala/nebflow/core/scheduler/ScheduledTaskStore.scala:66— src/main/scala/nebflow/core/scheduler/ScheduledTaskStore.scala:66-82 | src/main/scala/nebflow/core/scheduler/ScheduledTaskStore.scala:85-97 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4136— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4136-4148 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1529-1544 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4593— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4593-4605 | src/main/scala/nebflow/gateway/AuthRoutes.scala:537-549 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×9
Edited copy of a member (2 corresponding lines) src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:95— src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:95-96 | src/main/scala/nebflow/neblink/PortalUplinkBackpressure.scala:211-212 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:204— src/main/scala/nebflow/core/delegate/DeviceResultOutbox.scala:204-205 | src/main/scala/nebflow/neblink/PortalUplinkBackpressure.scala:329-330 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) src/main/scala/nebflow/core/tools/FileOpenCache.scala:137— src/main/scala/nebflow/core/tools/FileOpenCache.scala:137-138 | src/main/scala/nebflow/core/tools/PointerPickup.scala:44-45 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5840— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5840-5841 | src/main/scala/nebflow/gateway/NfFileRoutes.scala:59-61 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:383— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:383-384 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:487-488 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:492— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:492-493 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:658-659 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:788— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:788-792 | src/main/scala/nebflow/core/LlmLogWriter.scala:899-900 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:228— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:228-229 | src/main/scala/nebflow/llm/fallback.scala:371-372 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1199— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1199-1200 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1399-1400 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1219— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1219-1240 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1421-1442 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1466— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1466-1487 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1683-1704 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1466` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2516— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2516-2537 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:545-566 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2573— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2573-2594 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:88-109 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2573` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:957— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:957-978 | src/main/scala/nebflow/core/LlmLogWriter.scala:1080-1101 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:237— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:237-258 | src/main/scala/nebflow/llm/registry.scala:342-363 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:739— src/main/scala/nebflow/core/plugin/PluginRegistry.scala:739-760 | src/main/scala/nebflow/core/plugin/PluginRegistry.scala:793-814 — 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 (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1402— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1402-1423 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:933-954 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/NeblinkRoutes.scala:960` calls `params`, `flatMap`, `filter` and `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1424` 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 (22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:335— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:335-356 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:343-364 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Low cohesion: WebSocketRoutes (LCOM4 10) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:35— WebSocketRoutes'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: UiStore (LCOM4 5) src/main/scala/nebflow/cli/uiStore.scala:44— UiStore'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: NeblinkService (LCOM4 5) src/main/scala/nebflow/neblink/NeblinkService.scala:42— NeblinkService'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: NeblinkClient (LCOM4 4) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:167— NeblinkClient's methods fall into 4 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 4 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: ProviderRegistry (LCOM4 4) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:35— ProviderRegistry's methods fall into 4 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 4 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: NebflowUI (LCOM4 4) src/main/scala/nebflow/cli/ui.scala:12— NebflowUI's methods fall into 4 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 4 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: ProviderRegistry (LCOM4 4) src/main/scala/nebflow/llm/registry.scala:41— ProviderRegistry's methods fall into 4 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 4 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: NeblinkClient (LCOM4 4) src/main/scala/nebflow/neblink/NeblinkClient.scala:206— NeblinkClient's methods fall into 4 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 4 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.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×8
Disposable created and abandoned in the function that made it src/main/scala/nebflow/shared/FileHistory.scala:107— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it src/main/scala/nebflow/perception/PerceptionService.scala:465— `java.nio.file.Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(java.nio.file.Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it src/main/scala/nebflow/core/LlmLogWriter.scala:936— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it src/main/scala/nebflow/core/LlmLogWriter.scala:965— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it src/main/scala/nebflow/core/LlmLogWriter.scala:1052— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:822— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:849— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:931— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Repeated repair: src/main/scala/nebflow/neblink/NeblinkEnrollment.scala src/main/scala/nebflow/neblink/NeblinkEnrollment.scala:153— src/main/scala/nebflow/neblink/NeblinkEnrollment.scala changed 15 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is NeblinkEnrollment.persistCredential at line 153), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(neblink): relay-honest 批 —— 登出→重登录后隧道幂等 ensure-start + 状态诚实化”; “Revert "merge: pr48w1-reanchor-impl into main"”; “fix(neblink): classify credential failures, three-part error text, corrupt-credential self-heal”; “fix(neblink): 停摆门提到 register 之前 —— 被踢后禁自动重登录/重注册”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/neblink/NeblinkEnrollment.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/main/scala/nebflow/cli/DetachedApply.scala src/main/scala/nebflow/cli/DetachedApply.scala:350— src/main/scala/nebflow/cli/DetachedApply.scala changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is DetachedApply.fireLaunchd at line 350), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(infra): #916 task <Command> 改 powershell 全路径——TS 服务上下文解析不到裸名(探针实证 0x80070002→0)”; “fix(infra): #916 task XML 编码改 UTF-16LE+BOM——schtasks 解析器拒 BE(malformed (1,2))”; “fix(infra): #916 os.write.over 参数名修正 createFolders(createDirs 不存在)”; “fix(infra): #916 XML 转义去 scala-xml 依赖——手写 &<> 转义(Utility.escape 迁移面/依赖面皆不稳)”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/cli/DetachedApply.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/main/scala/nebflow/core/delegate/DeviceDelegate.scala src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:368— src/main/scala/nebflow/core/delegate/DeviceDelegate.scala changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is DeviceDelegate.handleSpawn at line 368), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(neblink): 台账 #944 跨设备回报丢件腿——完成件先落盘、relay 重连按序补投(宁重勿丢)”; “fix(panel,taskledger): task panel retired-ledger leak + project filter empty — rows world-seat gate + legacy project-tag reconciliation”; “fix(p6): register delegate receive face — addDataHandler IO was discarded in Unit context”; “fix(web): pointer capture for the voice drag gesture — observability for the device delegate channel”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/core/delegate/DeviceDelegate.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/main/resources/web/js/modelPanel.js src/main/resources/web/js/modelPanel.js:485— src/main/resources/web/js/modelPanel.js changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is modelPanel.buildFollowerBlock at line 485), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(model-panel): 台账 #937 /model 面板降级面——全角色读数失败给显式失败态+重试入口”; “refactor(name): parameterize the agent DISPLAY name, keep the mechanism key fixed”; “fix(web): /model panel Escape-to-close + kernel note in the follow state”; “fix(web): /model panel reveal target + dead preset style cleanup”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/modelPanel.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.
Repeated repair: src/main/scala/nebflow/social/WeixinIlinkScanBind.scala src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:337— src/main/scala/nebflow/social/WeixinIlinkScanBind.scala changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is WeixinIlinkScanBind.driveLogin at line 337), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(weixin-bind): 绑定事务化硬化——provision 重试+活性门、失败回滚禁半绑定、no-return-address 升级+补投(bind-transactional 批 2026-10-20)”; “weixin-qr-fix: WeixinIlinkScanBind 传输层失败归入 sidecar_unreachable 词表(作者 2026-10-05 令·commit 不重启)”; “soc483 fix package: baseurl validation, README scan-bind verb, weixin source marker”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/social/WeixinIlinkScanBind.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/main/scala/nebflow/social/outbound/OutboundText.scala src/main/scala/nebflow/social/outbound/OutboundText.scala:66— src/main/scala/nebflow/social/outbound/OutboundText.scala changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is OutboundText.unwrapLinks at line 66), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(social): unwrap the underscore emphasis family in the outbound text leg”; “fix(social): make stripSyntax return the rule separator as an expression”; “fix(social): drop the closing backtick delimiter in inline code spans”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/scala/nebflow/social/outbound/OutboundText.scala`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/main/resources/web/js/msgQuote.js src/main/resources/web/js/msgQuote.js:290— src/main/resources/web/js/msgQuote.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is msgQuote.quoteViewOf at line 290), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(web): 输入消息排队回退批(作者令 2026-10-23 09:14 逐字「我们的输入消息排队功能采用我们之前的。大概两天以前的设计。现在的设计不好用」)——排队面恢复 2026-10-21 形态(BASE 383f4e197):busy 插话回归「入队即排队条行级明细」(头行排队中(N)+折叠钮+行文本点击展开+附件缩略+qattachvault 失败注记+立即发送/撤回/移除行按钮+拖拽排序,chatQueue.js/input.css 整文件 checkout BASE——两文件 BASE 后仅排队批触碰已核清);input.js busy 腿回归直入队零乐观气泡零 rendered、refreshQueue 回三 handler、右键菜单队列执行面(runQueuedAction/queuedItemByClientId+msgQuote 三动作项)退役;locales 退役 10-22 批五键(waitingTurn/queuedCount/turnElapsed/failedCount/chat.queueRecall)恢复 BASE 三键(dragReorder/clickExpand/clickCollapse);保留非排队面:item.ts 数据真值钉(queueMessage/persistQueue/drain 补渲时间戳)、对话层活性批 conn 横幅接线与 flipOfflineMark 补渲收口、离线腿待送达乐观气泡(f1-send-queue BASE 既有)、附件卡 chip 族、qattachvault 数据层;spec 换代:queuebar-informative 重写 BASE 排队条契约(亮暗 ALL PASS+S1-S8 静态源钉)、send-bubble-independence 重写 BASE 反并泡语义(busy 零气泡→排队条行独立→drain 逐条一行一气泡 ALL PASS)、msgqueue-recall-attach 6/6+msgqueue-image-mime 5/5+queue-image-refresh checkout BASE 全绿、chatinput-two-defects-shots A 腿改 BASE 语义 ALL PASS、busy-queue-ack 删除(四钉全为已退役面孔,值由前两 spec 覆盖);邻族回归 f1-send-queue/resend-dedup/busy-lifecycle ALL PASS+attach-bubble-unify 13/13;checkJs 257=冻结基线 PASS;check-circular 与 main HEAD 同一既有 SCC[3](零回归);亮暗×全景/特写 4+排队态/drain 态 2 截图证据(evidence/20261023_queue-restore)+批报告 reports/20261023_094109_input-queue-restore__delegate-nebflow-68bb9f9a.md”; “fix(web): 排队呈现回退批(作者回访令 2026-10-22「怎么还出现了发送了的消息还在队列里的问题。我觉得这个可能需要回退,已收到的标记也是多余的。」)——对今日 #714 两连发批(乐观气泡+已收到标)+ 排队信息量批(队列行位次标)的呈现层回退:队列条只保留头行「等待当前回复完成 · N 条排队 · 已进行 Xs」(活秒表保留),行级明细(文本/位次标/已收到 chip/立即发送/撤回/移除按钮/拖拽重排/折叠钮)全退役——排队消息已作为乐观气泡上屏,队列条再渲染内容行 = 同一消息双呈现;「已收到」标全退役(气泡 .acked 绿✓ + 队列行 ack chip 同撤,上屏即收到不用标),离线腿「待发送」时钟标保留(语义不同:真离线未出线);能力不丢入口收敛:立即发送/撤回/移除移入乐观气泡右键菜单(msgQuote.attachQuoteMenu 挂点 → input.runQueuedAction 执行面,动态 import 破静态环,手机长按 contextmenu 同一入口),菜单含既有 复制/引用;qattachvault 禁静默面保形(行级失败注记退役 ⇒ 头行红色失败计数后缀 .queue-bar-failed);数据层不动(state.messageQueue/queueMessage 钉死寻址/drain 翻面/persistQueue 全原样,净删 -501 行呈现面);spec 换代重写 2(queuebar-informative 亮暗 ALL PASS + busy-queue-ack)+ 邻族重锚 7(send-bubble-independence S2/S6、queue-image-refresh 失败面、msgqueue-recall-attach 6/6、msgqueue-image-mime 5/5 基线红 K5 随重锚转绿、chatinput-two-defects-shots A3、askuser/askinput 三件交互迁移)+ 亮暗×全景/特写 4 截图证据(queue-rollback after 4/4);checkJs 254<基线257 + check-circular 与 main 逐字节同 + build 179 orphans 0”; “fix(web,seed): post-merge checkJs gate repairs + restore seed manifest slideblocks”. 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 08:17:39 +08:00' --until='2026-10-29 08:17:39 +08:00' --full-history --no-merges -- src/main/resources/web/js/msgQuote.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.
MethodTooLong: RestApiRoutes.relayUpdateFallback evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2558— MethodTooLong — relayUpdateFallback runs 577 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 477 over it, 5.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LlmInterface.createLlm evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:358— MethodTooLong — createLlm runs 471 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 371 over it, 4.71× 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: LlmInterface.createLlm src/main/scala/nebflow/llm/interface.scala:392— MethodTooLong — createLlm runs 448 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 348 over it, 4.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AuthRoutes.handleAuthCallback src/main/scala/nebflow/gateway/AuthRoutes.scala:275— MethodTooLong — handleAuthCallback runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RestApiRoutes.handleAuthCallback evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4375— MethodTooLong — handleAuthCallback runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BashTool.cleanOutput src/main/scala/nebflow/core/tools/BashTool.scala:1072— MethodTooLong — cleanOutput runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DelegateRevival.revive src/main/scala/nebflow/agent/DelegateRevival.scala:109— MethodTooLong — revive runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:651— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:651-674 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:705-719 | src/main/scala/nebflow/neblink/NeblinkClient.scala:753-781 | src/main/scala/nebflow/neblink/NeblinkClient.scala:814-828 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:847— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:847-863 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1466-1495 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1001-1020 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1683-1712 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1383— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1383-1402 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1410-1420 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1596-1615 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1625-1635 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1177— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1177-1192 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1267-4445 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1763-1778 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:384-405 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1267— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1267-4445 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:71-2352 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:25-318 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:974-1023 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6215— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6215-6230 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6294-6312 | src/main/scala/nebflow/gateway/StaticRoutes.scala:516-544 | src/main/scala/nebflow/gateway/StaticRoutes.scala:868-886 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:71— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:71-2352 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2477-2488 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:57-1214 | src/main/scala/nebflow/gateway/SocialRoutes.scala:30-994 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×7
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/social/FeishuScanBind.scala:110— src/main/scala/nebflow/social/FeishuScanBind.scala:110-116 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:101-107 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/core/plugin/OfficialPackages.scala:232— src/main/scala/nebflow/core/plugin/OfficialPackages.scala:232-238 | src/main/scala/nebflow/core/seed/SeedService.scala:585-591 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/core/delegate/DelegateJudge.scala:215— src/main/scala/nebflow/core/delegate/DelegateJudge.scala:215-223 | src/main/scala/nebflow/core/delegate/DelegateJudge.scala:230-236 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/bridge/BridgeManager.scala:50— src/main/scala/nebflow/bridge/BridgeManager.scala:50-57 | src/main/scala/nebflow/bridge/BridgeManager.scala:123-129 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/agent/PingpongStateFile.scala:103— src/main/scala/nebflow/agent/PingpongStateFile.scala:103-110 | src/main/scala/nebflow/core/processor/HeldReceiptStore.scala:129-135 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/main/scala/nebflow/core/compact/CompactService.scala:70— src/main/scala/nebflow/core/compact/CompactService.scala:70-76 | src/main/scala/nebflow/core/compact/FullCompact.scala:429-436 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) scripts/sync-brand-auth.py:12— scripts/sync-brand-auth.py:12-18 | tools/logto-email/push_templates.py:33-43 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1087— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1087-1092 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1117-1122 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1881-1886 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1087` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3995— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3995-4001 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4013-4018 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:651-656 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3995` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 3) src/main/scala/nebflow/cli/PluginCommand.scala:114— src/main/scala/nebflow/cli/PluginCommand.scala:114-119 | src/main/scala/nebflow/cli/PluginCommand.scala:159-164 | src/main/scala/nebflow/cli/PluginCommand.scala:206-211 — 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, `src/main/scala/nebflow/cli/PluginCommand.scala:153` calls `postPluginAction`, `getOrElse` and `src/main/scala/nebflow/cli/PluginCommand.scala:113` 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 (6 lines × 3) src/main/scala/nebflow/core/tools/NodeReportTool.scala:176— src/main/scala/nebflow/core/tools/NodeReportTool.scala:176-186 | src/main/scala/nebflow/core/tools/TaskBoardTool.scala:341-346 | src/main/scala/nebflow/core/tools/TaskTool.scala:259-264 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/NodeReportTool.scala:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 3) src/main/scala/nebflow/gateway/ConfigRoutes.scala:207— src/main/scala/nebflow/gateway/ConfigRoutes.scala:207-212 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:236-241 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:264-269 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/ConfigRoutes.scala:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/main/scala/nebflow/gateway/WsAskHandlers.scala:130— src/main/scala/nebflow/gateway/WsAskHandlers.scala:130-135 | src/main/scala/nebflow/gateway/WsAskHandlers.scala:167-172 | src/main/scala/nebflow/gateway/WsAskHandlers.scala:216-221 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WsAskHandlers.scala:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/main/scala/nebflow/core/wiki/WikiService.scala:597— src/main/scala/nebflow/core/wiki/WikiService.scala:597-602 | src/main/scala/nebflow/core/wiki/WikiService.scala:643-648 | src/main/scala/nebflow/core/wiki/WikiService.scala:684-689 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/wiki/WikiService.scala:597` 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.
(anonymous) (cognitive 16) src/main/resources/web/js/main.js:1029— (anonymous) 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.
(anonymous) (cognitive 16) src/main/resources/web/js/main.js:1502— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (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.
(anonymous) (cognitive 16) src/main/resources/web/js/main.js:2241— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (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.
(anonymous) (cognitive 16) src/main/resources/web/js/main.js:2556— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
(anonymous) (cognitive 16) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1239— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 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.
(anonymous) (cognitive 16) REDACTED:1202— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 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.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×6
Edited copy of a member (10 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4093— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4093-4102 | src/main/scala/nebflow/gateway/ProviderProbe.scala:204-216 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/scala/nebflow/core/entity/BuiltinAgents.scala:117— src/main/scala/nebflow/core/entity/BuiltinAgents.scala:117-127 | src/main/scala/nebflow/core/presets/SchemePolicy.scala:80-89 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:213— src/main/scala/nebflow/llm/decision/DelegateModeMachine.scala:213-226 | src/main/scala/nebflow/llm/decision/LlmAllocator.scala:148-157 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/scala/nebflow/gateway/StaticRoutes.scala:591— src/main/scala/nebflow/gateway/StaticRoutes.scala:591-600 | src/main/scala/nebflow/gateway/StaticRoutes.scala:718-729 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/scala/nebflow/service/ConfigService.scala:706— src/main/scala/nebflow/service/ConfigService.scala:706-715 | src/main/scala/nebflow/service/ConfigService.scala:836-845 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4523— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4523-4532 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2399-2415 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:138— src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:138-151 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1022-1035 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/core/tools/ImageInject.scala:162— src/main/scala/nebflow/core/tools/ImageInject.scala:162-175 | src/main/scala/nebflow/core/tools/MailTool.scala:1402-1422 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:119— src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:119-132 | src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:139-152 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/core/flow/MailQueueStore.scala:83— src/main/scala/nebflow/core/flow/MailQueueStore.scala:83-96 | src/main/scala/nebflow/core/flow/MailQueueStore.scala:100-113 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/core/LlmLogWriter.scala:497— src/main/scala/nebflow/core/LlmLogWriter.scala:497-514 | src/main/scala/nebflow/core/ToolsLogWriter.scala:153-166 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/scala/nebflow/core/tools/AskTools.scala:61— src/main/scala/nebflow/core/tools/AskTools.scala:61-75 | src/main/scala/nebflow/core/tools/TaskSearchTool.scala:37-50 — 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.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:993— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:993-1022 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1065-1094 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:236— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:236-265 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:275-304 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:993— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:993-1022 | src/main/scala/nebflow/core/LlmLogWriter.scala:1121-1150 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2527— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2527-2556 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1234-1263 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1631— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1631-1660 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:70-99 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3997— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3997-4026 | src/main/scala/nebflow/gateway/ProviderProbe.scala:90-119 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ProviderProbe.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:133— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:133-159 | src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:163-189 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` and `src/main/scala/nebflow/neblink/NeblinkDiscovery.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1435— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1435-1461 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:571-597 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1435` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3312— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3312-3338 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1253-1279 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2860— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2860-2886 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:919-945 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2860` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2898— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2898-2924 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:966-992 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2898` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3252— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3252-3278 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1945-1971 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2776— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2776-2783 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:427-434 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:791-798 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2776` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) src/main/scala/nebflow/agent/AgentFrozen.scala:225— src/main/scala/nebflow/agent/AgentFrozen.scala:225-233 | src/main/scala/nebflow/agent/AgentFrozen.scala:294-301 | src/main/scala/nebflow/agent/AgentFrozen.scala:359-366 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentFrozen.scala:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/agent/AgentFrozen.scala:293` calls `logAgentEvent` and `src/main/scala/nebflow/agent/AgentFrozen.scala:358` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:49— src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:49-56 | src/main/scala/nebflow/core/plugin/PluginDispatchPolicy.scala:74-81 | src/main/scala/nebflow/core/plugin/PluginRegistry.scala:1163-1170 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (8 lines × 3) src/main/scala/nebflow/core/wiki/WikiService.scala:294— src/main/scala/nebflow/core/wiki/WikiService.scala:294-301 | src/main/scala/nebflow/core/wiki/WikiService.scala:430-438 | src/main/scala/nebflow/core/wiki/WikiService.scala:447-455 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/wiki/WikiService.scala:294` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:921— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:921-928 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:390-397 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1390-1397 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:932` calls `parse`, `getOrElse` and `src/main/scala/nebflow/gateway/PresenceRoutes.scala:1398` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:212— src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:212-219 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:541-554 | src/main/scala/nebflow/social/SocialChannels.scala:364-373 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:221` calls `restrictDirectoryIfPresent`, `exists`, `restrictDirectory` and `src/main/scala/nebflow/core/secrets/SecretsStore.scala:560` 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 (5 lines × 3) src/main/scala/nebflow/gateway/PresenceRoutes.scala:994— src/main/scala/nebflow/gateway/PresenceRoutes.scala:994-998 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1009-1013 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1024-1028 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/PresenceRoutes.scala:994` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1659— src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1659-1666 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1700-1707 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:333-337 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1659` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/main/scala/nebflow/social/FeishuScanBind.scala:290— src/main/scala/nebflow/social/FeishuScanBind.scala:290-294 | src/main/scala/nebflow/social/WeixinBindAutoWire.scala:528-532 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:265-269 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:134— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:134-138 | src/main/scala/nebflow/neblink/NeblinkModel.scala:606-610 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:137-141 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/main/scala/nebflow/agent/AgentFinishTurn.scala:551— src/main/scala/nebflow/agent/AgentFinishTurn.scala:551-555 | src/main/scala/nebflow/agent/AgentProcessing.scala:283-287 | src/main/scala/nebflow/agent/AgentProcessing.scala:698-702 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentFinishTurn.scala:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) src/main/scala/nebflow/cli/ConfigCommand.scala:28— src/main/scala/nebflow/cli/ConfigCommand.scala:28-32 | src/main/scala/nebflow/cli/ConfigCommand.scala:161-165 | src/main/scala/nebflow/cli/ProviderCommand.scala:34-38 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/cli/ConfigCommand.scala:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/cli/ConfigCommand.scala:33` calls `orElse`, `get`, `Some` and `src/main/scala/nebflow/cli/ProviderCommand.scala:39` 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.
AC1 · Text alternatives· <canvas> without a text alternative · ×5
<canvas> without a text alternative src/main/resources/seed/plugins/design-cards/skills/guizang-social-card-skill/assets/template-editorial-card.html:783— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative src/main/resources/web/js/attachImagePreview.js:174— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative src/main/resources/web/js/socialPanel.js:1625— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative src/main/resources/web/js/viewers/pdf.js:75— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative src/main/resources/web/js/wikiGraph.js:236— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×5
Focus outline removed in CSS without a :focus replacement design/20261006_askuser_redesign/style-2/mockup.html:179— `.option-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement design/20261006_askuser_redesign/style-2/mockup.html:231— `.option-custom-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement design/20261006_askuser_redesign/style-3/mockup.html:136— `.answer` 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 reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:186— `.wsearch input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:232— `.dd-opt` 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.
Low contrast colour pair in CSS (2.4:1) design/20261006_askuser_redesign/style-3/mockup.html:142— `.primary` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) design/20261006_askuser_redesign/style-3/mockup.html:169— `.chip.picked` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) design/20261006_askuser_redesign/style-3/mockup.html:234— `.send` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:86— `.rbtn .bdg` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:84— `.stbtn .bdg` sets color: #fff on background-color: #07c160 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Change coupling: EditTool.scala ↔ WriteTool.scala src/main/scala/nebflow/core/tools/EditTool.scala:1— `src/main/scala/nebflow/core/tools/EditTool.scala` and `src/main/scala/nebflow/core/tools/WriteTool.scala` change together 87% of the time (13 of the 15 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `1ef741ee` feat(engine,web): per-node file-change diff reports + diff view in no…; `65d4228f` feat(sandbox): 阶段 2a 沙箱底座——SandboxPolicy/FileSandbox/Seatbelt 后端 + 五工…; `4b991633` fix(tools): Edit description taught parallel Edits — point to MultiEd… — run `git show` on any of them.
Change coupling: GlobTool.scala ↔ GrepTool.scala src/main/scala/nebflow/core/tools/GlobTool.scala:1— `src/main/scala/nebflow/core/tools/GlobTool.scala` and `src/main/scala/nebflow/core/tools/GrepTool.scala` change together 82% of the time (9 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, 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 `14bef960` chore(sandbox): 定义清理批 v81 —— 删零消费点定义 memoryGlobExcludes(+3 处点名注释同批清理); `5adb735b` feat(sandbox): S1 解耦 sandboxEnabled 信号 + S2 拆 JVM 文件闸(拆闸保解析); `ec14176f` fix(tools): Glob 三实证缺陷修复——cwd 相对搜索修锚定 + 单层语义 + 超限截断 + dot/CJK 显式放行 — run `git show` on any of them.
Change coupling: bgAgentPopup.js ↔ flowAgentPopup.js src/main/resources/web/js/bgAgentPopup.js:1— `src/main/resources/web/js/bgAgentPopup.js` and `src/main/resources/web/js/flowAgentPopup.js` change together 68% of the time (26 of the 38 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 26 shared commits counted here, the most recent 3 are `249d31da` remove(web): 桌面端上下文用量显示整链退役(作者令 2026-10-23「把桌面端的上下文用量显示也去掉」); `883712c4` stream-919-unify: 统一回归 9.19 显示方式+思考窗 5 行硬上限收口(作者 2026-10-07 22:34 令+1…; `d7803463` panel-detail-route: 分层展示批——同源工具数据双视图分支(作者 2026-10-06 17:55 令+追加令)——主聊… — run `git show` on any of them.
Change coupling: RestApiRoutes.scala ↔ NeblinkEnrollment.scala src/main/scala/nebflow/gateway/RestApiRoutes.scala:1— `src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/neblink/NeblinkEnrollment.scala` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `6227fd5d` fix(neblink): classify credential failures, three-part error text, co…; `16d1e422` feat(neblink): explicit user login passes the isolation guard; surfac…; `8307d3cf` fix(neblink): 身份落盘与 refreshToken 解耦(O5 连带回归配套修法) — run `git show` on any of them.
Change coupling: AgentCore.scala ↔ GrepTool.scala src/main/scala/nebflow/agent/AgentCore.scala:1— `src/main/scala/nebflow/agent/AgentCore.scala` and `src/main/scala/nebflow/core/tools/GrepTool.scala` change together 55% of the time (6 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 — 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 6 shared commits counted here, the most recent 3 are `5adb735b` feat(sandbox): S1 解耦 sandboxEnabled 信号 + S2 拆 JVM 文件闸(拆闸保解析); `65d4228f` feat(sandbox): 阶段 2a 沙箱底座——SandboxPolicy/FileSandbox/Seatbelt 后端 + 五工…; `65f4cf55` fix: add cross-platform path validation in tools and core — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) src/main/scala/nebflow/core/secrets/SecretsStore.scala:282— src/main/scala/nebflow/core/secrets/SecretsStore.scala:282-296 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:303-317 — 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) src/main/scala/nebflow/gateway/connguard.scala:391— src/main/scala/nebflow/gateway/connguard.scala:391-411 | src/main/scala/nebflow/gateway/connguard.scala:439-453 — 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) src/main/scala/nebflow/neblink/FriendService.scala:974— src/main/scala/nebflow/neblink/FriendService.scala:974-990 | src/main/scala/nebflow/neblink/FriendService.scala:1174-1188 — 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) src/main/scala/nebflow/agent/SubAgentTaskStore.scala:304— src/main/scala/nebflow/agent/SubAgentTaskStore.scala:304-318 | src/main/scala/nebflow/agent/SubAgentTaskStore.scala:327-341 — 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) src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:301— src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:301-315 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:366-380 — 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 (16 corresponding lines) · ×5
Edited copy of a member (16 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1117— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1117-1132 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1700-1718 — 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) src/main/scala/nebflow/core/task/TaskStore.scala:270— src/main/scala/nebflow/core/task/TaskStore.scala:270-287 | src/main/scala/nebflow/core/tools/TaskListTool.scala:249-264 — 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) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:156— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:156-171 | src/main/scala/nebflow/llm/registry.scala:198-221 — 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) src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:427— src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:427-442 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:451-467 — 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) src/main/scala/nebflow/core/tools/BgNotifyPayload.scala:65— src/main/scala/nebflow/core/tools/BgNotifyPayload.scala:65-83 | src/main/scala/nebflow/core/tools/BgNotifyPayload.scala:94-109 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (28 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2280— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2280-2307 | src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala:132-159 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2397— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2397-2424 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:391-418 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:393— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:393-420 | src/main/scala/nebflow/core/LlmLogWriter.scala:417-444 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4167— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4167-4194 | src/main/scala/nebflow/gateway/WsDropboxHandlers.scala:142-169 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsDropboxHandlers.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28 lines × 2) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:690— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:690-717 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1107-1134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/social/FeishuBridgePlugin.scala:690` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2617— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2617-2630 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2638-2650 — 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 `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2617` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3020— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3020-3032 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1494-1507 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3020` 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 (13–14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4136— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4136-4148 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1531-1544 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:202— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:202-214 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:230-243 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (13–14 lines × 2) src/main/scala/nebflow/core/wiki/WikiService.scala:607— src/main/scala/nebflow/core/wiki/WikiService.scala:607-620 | src/main/scala/nebflow/core/wiki/WikiService.scala:652-664 — 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 `src/main/scala/nebflow/core/wiki/WikiService.scala:607` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6182— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6182-6188 | src/main/scala/nebflow/gateway/StaticRoutes.scala:265-272 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1100— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1100-1107 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:590-596 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:86— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:86-93 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:160-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 2) src/main/scala/nebflow/core/RestartHelper.scala:49— src/main/scala/nebflow/core/RestartHelper.scala:49-56 | src/main/scala/nebflow/core/RestartHelper.scala:63-69 — 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 `src/main/scala/nebflow/core/RestartHelper.scala:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1014— src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1014-1021 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1042-1048 — 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 `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1014` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2068— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2068-2074 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2139-2145 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2593-2602 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3479-3486 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2068` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2683— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2683-2690 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2766-2772 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:339-346 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:631-637 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2683` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2800— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2800-2806 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2827-2833 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1065-1071 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1121-1127 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2800` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) src/main/scala/nebflow/core/Guardrails.scala:49— src/main/scala/nebflow/core/Guardrails.scala:49-55 | src/main/scala/nebflow/core/compact/PingpongConfig.scala:26-32 | src/main/scala/nebflow/core/compact/PingpongConfig.scala:46-52 | src/main/scala/nebflow/core/permissions.scala:140-146 — there are 4 copies across 3 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/Guardrails.scala:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/core/Guardrails.scala:42` calls `Set` and `src/main/scala/nebflow/core/compact/PingpongConfig.scala:22` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1396— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1396-1402 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1414-1420 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1609-1615 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1629-1635 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1395` calls `add`, `getOrElse` and `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1413` 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· Edited copy of a member (26 corresponding lines) · ×4
Edited copy of a member (26 corresponding lines) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:55— src/main/scala/nebflow/core/tools/AgentFlowTool.scala:55-80 | src/main/scala/nebflow/core/tools/ChainWriteTool.scala:89-116 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:143— src/main/scala/nebflow/core/plugin/PluginBlockPolicy.scala:143-169 | src/main/scala/nebflow/core/plugin/PluginDispatchPolicy.scala:236-261 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5682— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5682-5707 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:517-547 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1157— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1157-1182 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1341-1380 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×4
Edited copy of a member (20 corresponding lines) src/main/scala/nebflow/service/ConfigService.scala:674— src/main/scala/nebflow/service/ConfigService.scala:674-696 | src/main/scala/nebflow/service/ConfigService.scala:812-831 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/main/scala/nebflow/gateway/SttService.scala:39— src/main/scala/nebflow/gateway/SttService.scala:39-58 | src/main/scala/nebflow/gateway/TtsService.scala:17-39 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4213— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4213-4232 | src/main/scala/nebflow/gateway/AuthRoutes.scala:84-107 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:393— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:393-412 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:497-516 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:498— src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:498-518 | src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:527-548 — 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) src/main/scala/nebflow/core/tools/DeviceProfile.scala:512— src/main/scala/nebflow/core/tools/DeviceProfile.scala:512-532 | src/main/scala/nebflow/core/tools/PointerPickup.scala:74-94 — 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) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:237— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:237-257 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:268-288 — 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) src/main/scala/nebflow/core/tools/TaskListTool.scala:909— src/main/scala/nebflow/core/tools/TaskListTool.scala:909-931 | src/main/scala/nebflow/core/tools/TaskListTool.scala:937-957 — 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 (24 corresponding lines) · ×4
Edited copy of a member (24 corresponding lines) src/main/scala/nebflow/service/ConfigService.scala:336— src/main/scala/nebflow/service/ConfigService.scala:336-359 | src/main/scala/nebflow/service/ConfigService.scala:391-414 — 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.
Edited copy of a member (24 corresponding lines) src/main/scala/nebflow/social/FeishuCredentials.scala:273— src/main/scala/nebflow/social/FeishuCredentials.scala:273-296 | src/main/scala/nebflow/social/SocialChannels.scala:259-285 — 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.
Edited copy of a member (24 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:85— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:85-108 | src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:108-138 — 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.
Edited copy of a member (24 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:942— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:942-965 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1007-1037 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×4
Edited copies of one member (3 members, 7+ corresponding lines) src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:216— src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:216-230 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:239-246 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:254-260 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) src/main/scala/nebflow/agent/AgentActor.scala:206— src/main/scala/nebflow/agent/AgentActor.scala:206-213 | src/main/scala/nebflow/agent/AgentActor.scala:1705-1712 | src/main/scala/nebflow/agent/AgentActor.scala:1723-1729 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) src/main/scala/nebflow/core/delegate/ChainStore.scala:82— src/main/scala/nebflow/core/delegate/ChainStore.scala:82-88 | src/main/scala/nebflow/core/delegate/DelegateDeliveryReceipts.scala:149-155 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:173-179 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) src/main/scala/nebflow/agent/CompactionQueueStore.scala:199— src/main/scala/nebflow/agent/CompactionQueueStore.scala:199-205 | src/main/scala/nebflow/core/flow/TurnStateStore.scala:88-94 | src/main/scala/nebflow/core/tools/BgTaskLedger.scala:163-169 — 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 copy of a member (1 corresponding lines) · ×4
Edited copy of a member (1 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1144— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1144-1144 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1328-1328 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:270— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:270-270 | src/main/scala/nebflow/llm/registry.scala:375-375 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) src/main/scala/nebflow/agent/InteractionHub.scala:644— src/main/scala/nebflow/agent/InteractionHub.scala:644-646 | src/main/scala/nebflow/gateway/BridgeAnswerReflection.scala:49-49 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) src/main/scala/nebflow/core/delegate/CancelReceipt.scala:41— src/main/scala/nebflow/core/delegate/CancelReceipt.scala:41-41 | src/main/scala/nebflow/core/delegate/DelegateFlowMapLifecycle.scala:48-48 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (57 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4381— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4381-4437 | src/main/scala/nebflow/gateway/AuthRoutes.scala:283-339 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (57 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2337— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2337-2393 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:324-380 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (57 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:957— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:957-1013 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1498-1554 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:957` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (57 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4934— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4934-4990 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2866-2922 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2311— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2311-2331 | src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala:170-190 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4439— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4439-4459 | src/main/scala/nebflow/gateway/AuthRoutes.scala:341-361 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4439` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:237— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:237-257 | src/main/scala/nebflow/neblink/NeblinkClient.scala:279-299 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6031— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6031-6051 | src/main/scala/nebflow/gateway/FsOps.scala:113-133 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/FsOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1242— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1242-1261 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1362-1381 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:654— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:654-673 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:830-849 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1575— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1575-1594 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:760-779 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1575` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:759` calls `clearRegistryEscalation` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1574` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2799— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2799-2818 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1064-1083 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2799` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2207— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2207-2221 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:626-641 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2765— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2765-2780 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:630-644 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (15–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4213— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4213-4228 | src/main/scala/nebflow/gateway/AuthRoutes.scala:86-100 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4046— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4046-4060 | src/main/scala/nebflow/gateway/ProviderProbe.scala:141-156 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ProviderProbe.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:524— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:524-535 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:523-535 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1460— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1460-1471 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1001-1013 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1460` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) src/main/scala/nebflow/core/entity/EntityLoader.scala:300— src/main/scala/nebflow/core/entity/EntityLoader.scala:300-312 | src/main/scala/nebflow/core/entity/EntityLoader.scala:353-364 — 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 `src/main/scala/nebflow/core/entity/EntityLoader.scala:300` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (12–13 lines × 2) src/main/scala/nebflow/core/tools/WebSearchTool.scala:199— src/main/scala/nebflow/core/tools/WebSearchTool.scala:199-211 | src/main/scala/nebflow/core/tools/WebSearchTool.scala:220-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/WebSearchTool.scala:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6366— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6366-6376 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3324-3336 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3324` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:352— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:352-362 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:45-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:352` 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–13 lines × 2) src/main/scala/nebflow/core/tools/AskTools.scala:184— src/main/scala/nebflow/core/tools/AskTools.scala:184-194 | src/main/scala/nebflow/core/tools/TaskTool.scala:292-304 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AskTools.scala:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) src/main/scala/nebflow/core/tools/EditTool.scala:259— src/main/scala/nebflow/core/tools/EditTool.scala:259-271 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:217-227 — 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–11 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1129— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1129-1137 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1309-1319 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 2) src/main/scala/nebflow/core/tools/DelegateTool.scala:171— src/main/scala/nebflow/core/tools/DelegateTool.scala:171-179 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:218-228 — 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–11 lines × 2) src/main/scala/nebflow/neblink/FriendService.scala:980— src/main/scala/nebflow/neblink/FriendService.scala:980-990 | src/main/scala/nebflow/neblink/FriendService.scala:1180-1188 — 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 `src/main/scala/nebflow/neblink/FriendService.scala:980` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 2) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1137— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1137-1145 | src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1269-1279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:911— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:911-918 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1075-1083 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:911` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1830— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1830-1838 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:259-266 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1830` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:184— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:184-192 | src/main/scala/nebflow/llm/registry.scala:241-248 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala` and `src/main/scala/nebflow/llm/registry.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/llm/registry.scala:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) src/main/scala/nebflow/agent/AgentProcessing.scala:1184— src/main/scala/nebflow/agent/AgentProcessing.scala:1184-1192 | src/main/scala/nebflow/agent/AgentProcessing.scala:1216-1223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure· Heading level jumps from h1 to h3 · ×3
Heading level jumps from h1 to h3 reports/20261020_211500_mobile-mockup-375-v2__delegate-nebflow-74eb4637.html:503— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h3 reports/20261020_214500_mobile-mockup-375-v3__delegate-nebflow-74eb4637.html:583— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h3 reports/20261027_220000_mobile-canvas-ux/mockup.html:195— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
(anonymous) (cyclomatic 21) src/main/resources/web/js/main.js:1176— (anonymous) 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.
(anonymous) (cyclomatic 21) src/main/resources/web/js/main.js:2821— (anonymous) 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.
(anonymous) (cyclomatic 21) REDACTED:136— (anonymous) has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 16) src/main/resources/web/js/main.js:1452— (anonymous) 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.
(anonymous) (cyclomatic 16) src/main/resources/web/js/chat.js:2158— (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
(anonymous) (cyclomatic 16) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:955— (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) src/main/scala/nebflow/core/delegate/MergeQueue.scala:657— src/main/scala/nebflow/core/delegate/MergeQueue.scala:657-677 | src/main/scala/nebflow/core/delegate/MergeQueue.scala:686-708 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) src/main/scala/nebflow/cli/ChatCommands.scala:125— src/main/scala/nebflow/cli/ChatCommands.scala:125-146 | src/main/scala/nebflow/cli/SkillCommand.scala:49-67 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:515— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:515-533 | src/main/scala/nebflow/neblink/NeblinkClient.scala:590-610 — 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 (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:335— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:335-359 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:343-368 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/main/scala/nebflow/core/tools/DelegateTool.scala:91— src/main/scala/nebflow/core/tools/DelegateTool.scala:91-115 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:86-112 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4545— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4545-4571 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2427-2451 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:911— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:911-927 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1075-1092 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/main/scala/nebflow/core/tools/MailTool.scala:1589— src/main/scala/nebflow/core/tools/MailTool.scala:1589-1605 | src/main/scala/nebflow/core/tools/MailTool.scala:1883-1900 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5805— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5805-5821 | src/main/scala/nebflow/gateway/NfFilePolicy.scala:659-675 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×3
Edited copies of one member (3 members, 17+ corresponding lines) src/main/scala/nebflow/cli/PluginCommand.scala:114— src/main/scala/nebflow/cli/PluginCommand.scala:114-130 | src/main/scala/nebflow/cli/PluginCommand.scala:159-176 | src/main/scala/nebflow/cli/PluginCommand.scala:206-222 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:90— src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:90-106 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:160-176 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:185-207 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) src/main/scala/nebflow/social/outbound/OutboundPlanner.scala:77— src/main/scala/nebflow/social/outbound/OutboundPlanner.scala:77-93 | src/main/scala/nebflow/social/outbound/OutboundPlanner.scala:101-117 | src/main/scala/nebflow/social/outbound/OutboundPlanner.scala:125-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 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, 3+ corresponding lines) · ×3
Edited copies of one member (3 members, 3+ corresponding lines) src/main/scala/nebflow/core/tools/TaskBoardTool.scala:398— src/main/scala/nebflow/core/tools/TaskBoardTool.scala:398-400 | src/main/scala/nebflow/core/tools/TaskListTool.scala:1184-1186 | src/main/scala/nebflow/core/tools/TaskTool.scala:307-309 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5833— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5833-5835 | src/main/scala/nebflow/gateway/ConsoleTicketRoutes.scala:118-135 | src/main/scala/nebflow/gateway/NfFileRoutes.scala:50-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) src/main/scala/nebflow/gateway/auth.scala:20— src/main/scala/nebflow/gateway/auth.scala:20-24 | src/main/scala/nebflow/social/WeixinIngressToken.scala:134-136 | src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:226-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (32–33 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:767— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:767-799 | src/main/scala/nebflow/llm/interface.scala:864-895 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:767` 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 (32–33 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1968— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1968-1999 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:455-487 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (32–33 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5211— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5211-5242 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3158-3190 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5198` calls `extractToken` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3142` 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 (29 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2482— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2482-2510 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:504-532 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (29 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2778— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2778-2806 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:660-688 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2778` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4229— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4229-4257 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1918-1946 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1952` calls `deviceProvenanceOf` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4259` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (26 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2726— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2726-2751 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:576-601 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2726` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1492— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1492-1517 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1035-1060 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1492` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (26 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6059— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6059-6084 | src/main/scala/nebflow/gateway/FsOps.scala:141-166 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/FsOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1711— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1711-1733 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:852-874 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1711` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (23 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2253— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2253-2275 | src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala:97-119 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSkillsAsksHandlers.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1003— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1003-1025 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:475-497 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1003` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1080— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1080-1097 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:569-588 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1080` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–20 lines × 2) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1759— src/main/scala/nebflow/agent/AgentSessionExecution.scala:1759-1778 | src/main/scala/nebflow/agent/AgentSessionExecution.scala:1897-1914 — 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 `src/main/scala/nebflow/agent/AgentSessionExecution.scala:1759` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–20 lines × 2) src/main/scala/nebflow/neblink/FriendService.scala:993— src/main/scala/nebflow/neblink/FriendService.scala:993-1010 | src/main/scala/nebflow/neblink/FriendService.scala:1207-1226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1311— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1311-1324 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:199-214 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1311` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–16 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2102— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2102-2115 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:964-979 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–16 lines × 2) src/main/scala/nebflow/gateway/ConfigRoutes.scala:236— src/main/scala/nebflow/gateway/ConfigRoutes.scala:236-251 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:264-277 — 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 `src/main/scala/nebflow/gateway/ConfigRoutes.scala:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:379— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:379-390 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:389-399 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3300— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3300-3311 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1240-1250 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3300` 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–12 lines × 2) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:480— src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:480-491 | src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:374-384 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:480` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:373` calls `delay`, `logSearchInjection` and `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:478` 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 (9–10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1061— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1061-1070 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:547-555 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1061` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) src/main/scala/nebflow/cli/McpCommand.scala:24— src/main/scala/nebflow/cli/McpCommand.scala:24-33 | src/main/scala/nebflow/cli/ModelCommand.scala:147-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/cli/McpCommand.scala:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) src/main/scala/nebflow/core/tools/BashTool.scala:1275— src/main/scala/nebflow/core/tools/BashTool.scala:1275-1283 | src/main/scala/nebflow/core/tools/BgNotifyDelivery.scala:367-376 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/BgNotifyDelivery.scala:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2067— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2067-2074 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2138-2145 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3478-3486 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2067` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3475` calls `Left`, `wsSend`, `obj` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2136` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 3) src/main/scala/nebflow/agent/AgentFinishTurn.scala:449— src/main/scala/nebflow/agent/AgentFinishTurn.scala:449-457 | src/main/scala/nebflow/agent/AgentFinishTurn.scala:540-548 | src/main/scala/nebflow/agent/AgentProcessing.scala:342-349 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentProcessing.scala:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 3) src/main/scala/nebflow/core/tools/EditTool.scala:85— src/main/scala/nebflow/core/tools/EditTool.scala:85-93 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:92-100 | src/main/scala/nebflow/core/tools/WriteTool.scala:58-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/core/tools/WriteTool.scala:57` calls `startsWith`, `parseUpdatedStats` and `src/main/scala/nebflow/core/tools/EditTool.scala:85` 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 (5 lines × 4) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:651— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:651-658 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:705-709 | src/main/scala/nebflow/neblink/NeblinkClient.scala:753-760 | src/main/scala/nebflow/neblink/NeblinkClient.scala:814-818 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:651` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4806— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4806-4810 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4818-4823 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2730-2734 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2742-2747 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4806` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4812— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4812-4816 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4825-4829 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2736-2740 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2749-2753 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4812` 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.
Low contrast colour pair in CSS (4.0:1) design/20261006_askuser_redesign/index.html:41— `.callout` sets color: #7a7f87 on background-color: #ffffff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.0:1) design/20261006_askuser_redesign/index.html:81— `footer.declare` sets color: #7a7f87 on background-color: #ffffff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
sidebar.renderSessionSidebar (cyclomatic 65) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2117— sidebar.renderSessionSidebar has cyclomatic complexity 65 (threshold 15). Of this number, 28 points are the body's own statements and 37 belong to 12 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.
sidebar.renderSessionSidebar (cyclomatic 65) REDACTED:1979— sidebar.renderSessionSidebar has cyclomatic complexity 65 (threshold 15). Of this number, 28 points are the body's own statements and 37 belong to 12 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.
WebSocketRoutes.makeRecordingWsSend (cyclomatic 47) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4793— WebSocketRoutes.makeRecordingWsSend has cyclomatic complexity 47 (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.
WebSocketRoutes.makeRecordingWsSend (cyclomatic 47) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2717— WebSocketRoutes.makeRecordingWsSend has cyclomatic complexity 47 (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.
sidebar.renderOneSessionItem (cyclomatic 32) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1977— sidebar.renderOneSessionItem has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 2061, a function literal at line 1988, a function literal at line 2047, …). 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.
sidebar.renderOneSessionItem (cyclomatic 32) REDACTED:1823— sidebar.renderOneSessionItem has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1906, a function literal at line 1834, a function literal at line 1892, …). 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.
(anonymous) (cyclomatic 30) src/main/resources/web/js/main.js:4640— (anonymous) has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
(anonymous) (cyclomatic 30) src/main/resources/web/js/explorer.js:1142— (anonymous) has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 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.
updateFooterStatus (cyclomatic 26) src/main/resources/web/js/bgAgentPopup.js:927— updateFooterStatus has cyclomatic complexity 26 (threshold 15). Of this number, 25 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.
updateFooterStatus (cyclomatic 26) src/main/resources/web/js/flowAgentPopup.js:800— updateFooterStatus has cyclomatic complexity 26 (threshold 15). Of this number, 25 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.
sidebar.renderFolderItem (cyclomatic 23) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3218— sidebar.renderFolderItem has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 3357, a function literal at line 3306, a function literal at line 3267, …). 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.
sidebar.renderFolderItem (cyclomatic 23) REDACTED:3075— sidebar.renderFolderItem has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 3213, a function literal at line 3162, a function literal at line 3123, …). 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.
canvas.initCapsuleRing::onDocWheel (cyclomatic 23) src/main/resources/web/js/canvas.js:3678— canvas.initCapsuleRing::onDocWheel has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (canvas.initCapsuleRing::layout) 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.
canvas.initCapsuleRing::layout (cyclomatic 18) src/main/resources/web/js/canvas.js:3587— canvas.initCapsuleRing::layout 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. This shape REPEATS in the file: one other method here (canvas.initCapsuleRing::onDocWheel) 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.
(anonymous) (cyclomatic 22) src/main/resources/web/js/main.js:1120— (anonymous) has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 22) src/main/resources/web/js/main.js:1986— (anonymous) has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar.selectSessionRange (cyclomatic 18) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2791— sidebar.selectSessionRange has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar.selectSessionRange (cyclomatic 18) REDACTED:2653— sidebar.selectSessionRange has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 18) src/main/resources/web/js/main.js:2728— (anonymous) has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cyclomatic 18) src/main/resources/web/js/main.js:3637— (anonymous) 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.
canvasGestures.bindGestures::onUp (cyclomatic 17) src/main/resources/web/js/mobile/canvasGestures.js:171— canvasGestures.bindGestures::onUp has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (canvasGestures.bindGestures::onMove) 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.
canvasGestures.bindGestures::onMove (cyclomatic 16) src/main/resources/web/js/mobile/canvasGestures.js:150— canvasGestures.bindGestures::onMove 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. This shape REPEATS in the file: one other method here (canvasGestures.bindGestures::onUp) 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.
explorer.showContextMenu (cyclomatic 16) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1264— explorer.showContextMenu 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.
explorer.showContextMenu (cyclomatic 16) src/main/resources/web/js/explorer.js:1639— explorer.showContextMenu 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.
WebSocketRoutes.doSpawnRootAgent (cognitive 85) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:142— WebSocketRoutes.doSpawnRootAgent has cognitive complexity 85 (threshold 15). Drivers by points: loops 11 (66 pts), if/else 1 (10 pts), match/switch 1 (9 pts) (nesting depth added 72). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.doSpawnRootAgent (cognitive 85) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:181— WebSocketRoutes.doSpawnRootAgent has cognitive complexity 85 (threshold 15). Drivers by points: loops 11 (66 pts), if/else 1 (10 pts), match/switch 1 (9 pts) (nesting depth added 72). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.makeRecordingWsSend (cognitive 80) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4793— WebSocketRoutes.makeRecordingWsSend has cognitive complexity 80 (threshold 15). Drivers by points: if/else 43 (69 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketRoutes.makeRecordingWsSend (cognitive 80) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2717— WebSocketRoutes.makeRecordingWsSend has cognitive complexity 80 (threshold 15). Drivers by points: if/else 43 (69 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sidebar.renderSessionSidebar (cognitive 74) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2117— sidebar.renderSessionSidebar has cognitive complexity 74 (threshold 15). Drivers by points: if/else 29 (36 pts), boolean chains 24, ternaries 6 (9 pts), error handling 3 (4 pts), loops 1 (nesting depth added 11). Of this number, 29 points are the body's own statements and 45 belong to 12 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.
sidebar.renderSessionSidebar (cognitive 74) REDACTED:1979— sidebar.renderSessionSidebar has cognitive complexity 74 (threshold 15). Drivers by points: if/else 29 (36 pts), boolean chains 24, ternaries 6 (9 pts), error handling 3 (4 pts), loops 1 (nesting depth added 11). Of this number, 29 points are the body's own statements and 45 belong to 12 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.
ExplorerWatchSession.subscribe (cognitive 68) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:90— ExplorerWatchSession.subscribe has cognitive complexity 68 (threshold 15). Drivers by points: loops 9 (54 pts), match/switch 1 (10 pts), if/else 4 (nesting depth added 54). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExplorerWatchSession.subscribe (cognitive 68) src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:97— ExplorerWatchSession.subscribe has cognitive complexity 68 (threshold 15). Drivers by points: loops 9 (54 pts), match/switch 1 (10 pts), if/else 4 (nesting depth added 54). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
updateFooterStatus (cognitive 48) src/main/resources/web/js/bgAgentPopup.js:927— updateFooterStatus has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 11 (17 pts), boolean chains 7, other 1 (nesting depth added 21). Of this number, 44 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
updateFooterStatus (cognitive 48) src/main/resources/web/js/flowAgentPopup.js:800— updateFooterStatus has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 11 (17 pts), boolean chains 7, other 1 (nesting depth added 21). Of this number, 44 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
renderOneSessionItem (cognitive 42) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1977— renderOneSessionItem has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 8, ternaries 5 (nesting depth added 7). Most of this is not in the body itself: 10 of the 42 points are its own statements and the rest belongs to 9 function items inside it that branch (onclick, a function literal at line 1988, finishRename, …). 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.
renderOneSessionItem (cognitive 42) REDACTED:1823— renderOneSessionItem has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 8, ternaries 5 (nesting depth added 7). Most of this is not in the body itself: 10 of the 42 points are its own statements and the rest belongs to 9 function items inside it that branch (onclick, a function literal at line 1834, finishRename, …). 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.
NeblinkDiscovery.discoverViaServer (cognitive 39) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:111— NeblinkDiscovery.discoverViaServer has cognitive complexity 39 (threshold 15). Drivers by points: loops 8 (36 pts), match/switch 1 (3 pts) (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkDiscovery.discoverViaServer (cognitive 39) src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:141— NeblinkDiscovery.discoverViaServer has cognitive complexity 39 (threshold 15). Drivers by points: loops 8 (36 pts), match/switch 1 (3 pts) (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
(anonymous) (cognitive 37) src/main/resources/web/js/main.js:2126— (anonymous) has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 33, if/else 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.
(anonymous) (cognitive 37) src/main/resources/web/js/main.js:4431— (anonymous) has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (16 pts), if/else 2 (3 pts), loops 2 (nesting depth added 9). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4436, 4437). 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.
(anonymous) (cognitive 34) src/main/resources/web/js/main.js:2321— (anonymous) has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 13 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.
(anonymous) (cognitive 34) src/main/resources/web/js/explorer.js:1257— (anonymous) has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, if/else 7 (11 pts), ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 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.
CappedLineReader.readLine (cognitive 32) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:956— CappedLineReader.readLine has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). 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.
CappedLineReader.readLine (cognitive 32) src/main/scala/nebflow/core/LlmLogWriter.scala:1079— CappedLineReader.readLine has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). 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.
WebSocketRoutes.findLocalFile (cognitive 31) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4662— WebSocketRoutes.findLocalFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (7 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketRoutes.findLocalFile (cognitive 31) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2587— WebSocketRoutes.findLocalFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (7 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 30) src/main/resources/web/js/main.js:1120— (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 9 (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.
(anonymous) (cognitive 30) src/main/resources/web/js/main.js:2821— (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7 (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.
NeblinkPresenceService.syncPeers (cognitive 29) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:334— NeblinkPresenceService.syncPeers has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (28 pts), boolean chains 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkPresenceService.syncPeers (cognitive 29) src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:342— NeblinkPresenceService.syncPeers has cognitive complexity 29 (threshold 15). Drivers by points: loops 7 (28 pts), boolean chains 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LlmLogWriter.retentionRound (cognitive 27) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:832— LlmLogWriter.retentionRound has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
LlmLogWriter.retentionRound (cognitive 27) src/main/scala/nebflow/core/LlmLogWriter.scala:948— LlmLogWriter.retentionRound has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
(anonymous) (cognitive 27) src/main/resources/web/js/main.js:1452— (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 7 (nesting depth added 11). 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.
(anonymous) (cognitive 27) src/main/resources/web/js/scheduled-task.js:582— (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 13). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NeblinkClient.doLoginUnparked (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:342— NeblinkClient.doLoginUnparked has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 4 (6 pts), loops 2 (3 pts) (nesting depth added 14). 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.
NeblinkClient.doLoginUnparked (cognitive 25) src/main/scala/nebflow/neblink/NeblinkClient.scala:387— NeblinkClient.doLoginUnparked has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 4 (6 pts), loops 2 (3 pts) (nesting depth added 14). 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.
NeblinkPresenceService.noteEndpointFailure (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:716— NeblinkPresenceService.noteEndpointFailure has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 1 (3 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.
NeblinkPresenceService.noteEndpointFailure (cognitive 25) src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:770— NeblinkPresenceService.noteEndpointFailure has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 1 (3 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.
sidebar.selectSessionRange (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2791— sidebar.selectSessionRange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2806, 2805). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
sidebar.selectSessionRange (cognitive 25) REDACTED:2653— sidebar.selectSessionRange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2668, 2667). 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.
NeblinkDiscovery.diagnosticScan (cognitive 24) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:132— NeblinkDiscovery.diagnosticScan has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (9 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkDiscovery.diagnosticScan (cognitive 24) src/main/scala/nebflow/neblink/NeblinkDiscovery.scala:162— NeblinkDiscovery.diagnosticScan has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (9 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.stopTeamSessionActors (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:442— WebSocketRoutes.stopTeamSessionActors has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (7 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.stopTeamSessionActors (cognitive 22) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:547— WebSocketRoutes.stopTeamSessionActors has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (7 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
sidebar.updateSessionDraftDisplay (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2358— sidebar.updateSessionDraftDisplay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 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.
sidebar.updateSessionDraftDisplay (cognitive 22) REDACTED:2220— sidebar.updateSessionDraftDisplay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 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.
renderFolderItem (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3218— renderFolderItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 4 (nesting depth added 2). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 21 function items inside it that branch (finishFolderRename, a function literal at line 3306, a function literal at line 3267, …). 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.
renderFolderItem (cognitive 22) REDACTED:3075— renderFolderItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 4 (nesting depth added 2). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 21 function items inside it that branch (finishFolderRename, a function literal at line 3162, a function literal at line 3123, …). 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.
showContextMenu (cognitive 19) src/main/resources/web/js/explorer.js:1639— showContextMenu has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, ternaries 4 (8 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1669, 1668). 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.
showContextMenu (cognitive 19) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1264— showContextMenu has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, ternaries 4 (8 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1294, 1293). 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.
NeblinkPresenceService.dialCandidates (cognitive 18) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:437— NeblinkPresenceService.dialCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 10). 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.
NeblinkPresenceService.dialCandidates (cognitive 18) src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:450— NeblinkPresenceService.dialCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 10). 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.
ExplorerWatchSession.flush (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:269— ExplorerWatchSession.flush has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExplorerWatchSession.flush (cognitive 17) src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:301— ExplorerWatchSession.flush has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LlmLogWriter.collectReferencedHashes (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:986— LlmLogWriter.collectReferencedHashes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LlmLogWriter.collectReferencedHashes (cognitive 17) src/main/scala/nebflow/core/LlmLogWriter.scala:1114— LlmLogWriter.collectReferencedHashes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
showDeleteZone (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2844— showDeleteZone has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2862, 2854, 2859, …). 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.
showDeleteZone (cognitive 17) REDACTED:2706— showDeleteZone has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2724, 2716, 2721, …). 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.
createNewFolder (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3111— createNewFolder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 9 points are the body's own statements and 8 belong to 7 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.
createNewFolder (cognitive 17) REDACTED:2970— createNewFolder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 9 points are the body's own statements and 8 belong to 7 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.
Change-coupling hub: en.js → contacts.js, explorer.js, flowMapTab.js, flowViewers.js, friendsApi.js, onboarding.js, projectTab.js, wikiGraph.js src/main/resources/web/js/locales/en.js— `src/main/resources/web/js/locales/en.js` changes together with 8 other files — `src/main/resources/web/js/contacts.js`, `src/main/resources/web/js/explorer.js`, `src/main/resources/web/js/flowMapTab.js`, `src/main/resources/web/js/flowViewers.js`, `src/main/resources/web/js/friendsApi.js`, `src/main/resources/web/js/onboarding.js`, `src/main/resources/web/js/projectTab.js`, `src/main/resources/web/js/wikiGraph.js` — none of which declares a dependency on it: one file is the hub of 8 separate couplings, not 8 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 8.
Change-coupling hub: zh-CN.js → chatSearch.js, friendsApi.js, socialPanel.js src/main/resources/web/js/locales/zh-CN.js— `src/main/resources/web/js/locales/zh-CN.js` changes together with 3 other files — `src/main/resources/web/js/chatSearch.js`, `src/main/resources/web/js/friendsApi.js`, `src/main/resources/web/js/socialPanel.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· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1267— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1267-4445 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:510-559 — These two members are one piece of code written twice and then edited apart: 38 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 (38 corresponding lines) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1070— src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1070-1115 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1124-1161 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:993— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:993-1026 | src/main/scala/nebflow/core/LlmLogWriter.scala:1121-1158 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:321— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:321-350 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:423-452 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) src/main/scala/nebflow/core/wiki/WikiService.scala:587— src/main/scala/nebflow/core/wiki/WikiService.scala:587-625 | src/main/scala/nebflow/core/wiki/WikiService.scala:635-669 — These two members are one piece of code written twice and then edited apart: 35 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 (35 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1276— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1276-1310 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1482-1520 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×2
Edited copy of a member (47 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5900— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5900-5946 | src/main/scala/nebflow/gateway/NfFileRoutes.scala:361-418 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (47 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:70— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/registry.scala:70-116 | src/main/scala/nebflow/llm/registry.scala:80-156 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×2
Edited copy of a member (39 corresponding lines) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:917— src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:917-955 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1005-1061 — These two members are one piece of code written twice and then edited apart: 39 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 (39 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:312— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:312-354 | src/main/scala/nebflow/llm/interface.scala:350-388 — These two members are one piece of code written twice and then edited apart: 39 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 (45 corresponding lines) · ×2
Edited copy of a member (45 corresponding lines) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1794— src/main/scala/nebflow/agent/AgentSessionExecution.scala:1794-1838 | src/main/scala/nebflow/agent/AgentSessionExecution.scala:1932-1976 — These two members are one piece of code written twice and then edited apart: 45 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 (45 corresponding lines) src/main/scala/nebflow/core/entity/EntityLoader.scala:293— src/main/scala/nebflow/core/entity/EntityLoader.scala:293-337 | src/main/scala/nebflow/core/entity/EntityLoader.scala:346-390 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) src/main/scala/nebflow/social/FeishuScanBind.scala:252— src/main/scala/nebflow/social/FeishuScanBind.scala:252-281 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:229-257 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:124— src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:124-152 | src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:160-190 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) src/main/scala/nebflow/cli/FolderCommand.scala:29— src/main/scala/nebflow/cli/FolderCommand.scala:29-52 | src/main/scala/nebflow/cli/SessionCommand.scala:30-54 | src/main/scala/nebflow/cli/SkillCommand.scala:20-34 — 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.
Edited copies of one member (3 members, 15+ corresponding lines) src/main/scala/nebflow/core/tools/WebSearchTool.scala:195— src/main/scala/nebflow/core/tools/WebSearchTool.scala:195-211 | src/main/scala/nebflow/core/tools/WebSearchTool.scala:217-231 | src/main/scala/nebflow/core/tools/WebSearchTool.scala:237-251 — 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 (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:213— src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:213-234 | src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:243-265 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/main/scala/nebflow/social/WeixinIngressToken.scala:76— src/main/scala/nebflow/social/WeixinIngressToken.scala:76-97 | src/main/scala/nebflow/social/WeixinOutboundAdapter.scala:176-198 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×2
Edited copies of one member (3 members, 9+ corresponding lines) src/main/scala/nebflow/core/tools/AskUserQuestionTool.scala:560— src/main/scala/nebflow/core/tools/AskUserQuestionTool.scala:560-571 | src/main/scala/nebflow/core/tools/BashTool.scala:1004-1014 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:912-920 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/main/scala/nebflow/agent/InteractionHub.scala:242— src/main/scala/nebflow/agent/InteractionHub.scala:242-250 | src/main/scala/nebflow/agent/InteractionHub.scala:263-274 | src/main/scala/nebflow/agent/InteractionHub.scala:286-294 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) src/main/scala/nebflow/core/wiki/WikiService.scala:411— src/main/scala/nebflow/core/wiki/WikiService.scala:411-421 | src/main/scala/nebflow/core/wiki/WikiService.scala:424-438 | src/main/scala/nebflow/core/wiki/WikiService.scala:441-455 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/main/scala/nebflow/core/device/FleetConfig.scala:46— src/main/scala/nebflow/core/device/FleetConfig.scala:46-57 | src/main/scala/nebflow/core/executor/ExecutorRegistry.scala:157-168 | src/main/scala/nebflow/neblink/EgressWhitelist.scala:40-50 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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 (4 members, 8+ corresponding lines) · ×2
Edited copies of one member (4 members, 8+ corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1087— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1087-1098 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1105-1112 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1659-1674 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1683-1693 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) src/main/scala/nebflow/agent/CompactionQueueStore.scala:172— src/main/scala/nebflow/agent/CompactionQueueStore.scala:172-180 | src/main/scala/nebflow/agent/PingpongStateFile.scala:78-86 | src/main/scala/nebflow/core/processor/HeldReceiptStore.scala:117-125 | src/main/scala/nebflow/core/tools/BgTaskLedger.scala:152-159 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 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 copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) src/main/scala/nebflow/core/delegate/ChainStore.scala:92— src/main/scala/nebflow/core/delegate/ChainStore.scala:92-100 | src/main/scala/nebflow/core/delegate/DelegateDeliveryReceipts.scala:159-166 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:183-191 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) src/main/scala/nebflow/agent/SubAgentTaskStore.scala:86— src/main/scala/nebflow/agent/SubAgentTaskStore.scala:86-93 | src/main/scala/nebflow/core/scheduler/ScheduledTaskStore.scala:20-29 | src/main/scala/nebflow/core/workspace/KnowledgeStore.scala:20-29 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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.
Duplicated block (64–67 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:958— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:958-1021 | src/main/scala/nebflow/llm/interface.scala:984-1050 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:958` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (64–67 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1625— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1625-1688 | src/main/scala/nebflow/gateway/SocialRoutes.scala:126-192 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1625` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (52 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:839— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:839-890 | src/main/scala/nebflow/core/LlmLogWriter.scala:955-1006 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (52 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:174— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:174-225 | src/main/scala/nebflow/gateway/SessionRoutes.scala:56-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (46–47 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:537— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:537-582 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:582-628 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:537` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (46–47 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1945— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1945-1990 | src/main/scala/nebflow/gateway/SocialRoutes.scala:476-522 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1945` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (42–43 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4526— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4526-4567 | src/main/scala/nebflow/gateway/AuthRoutes.scala:439-481 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4526` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (42–43 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2932— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2932-2974 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1007-1048 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2932` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (39–40 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:404— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:404-442 | src/main/scala/nebflow/neblink/NeblinkClient.scala:462-501 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39–40 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4287— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4287-4325 | src/main/scala/nebflow/gateway/AuthRoutes.scala:176-215 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4287` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (37–39 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3076— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3076-3114 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1174-1210 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3076` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1212` calls `invalidated` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3115` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (37–39 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1545— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1545-1581 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1089-1127 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1545` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (33–35 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:107— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:107-139 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:144-178 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (33–35 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:503— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:503-535 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:282-316 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ConfigRoutes.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:503` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:114— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:114-148 | src/main/scala/nebflow/llm/fallback.scala:246-280 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala` and `src/main/scala/nebflow/llm/fallback.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (35 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:111— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:111-145 | src/main/scala/nebflow/gateway/HealthRoutes.scala:141-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3087— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3087-3120 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1882-1915 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3087` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5066— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5066-5099 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3024-3057 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5066` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5100` calls `downField`, `getOrElse` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3063` 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 (28–30 lines × 2) src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:238— src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:238-267 | src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:273-300 — 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 `src/main/scala/nebflow/llm/decision/DelegateJudgeMachine.scala:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–30 lines × 2) src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:335— src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:335-364 | src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:441-468 — 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 `src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27–29 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2172— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2172-2198 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:581-609 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (27–29 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:365— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:365-391 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:74-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:365` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2696— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2696-2720 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:367-391 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2696` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:447— src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:447-471 | src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:543-567 — 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 `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:569` calls `eval`, `ref`, `Tokens` and `src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:473` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (23–25 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5111— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5111-5135 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3066-3088 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23–25 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:401— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:401-423 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:410-434 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:682— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:682-705 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:78-101 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:682` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2603— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2603-2626 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:220-243 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–20 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:658— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:658-672 | src/main/scala/nebflow/neblink/NeblinkClient.scala:760-779 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:658` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–20 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:424— src/main/scala/nebflow/agent/AgentFrozen.scala:424-438 | src/main/scala/nebflow/agent/AgentProcessing.scala:957-976 — 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, `src/main/scala/nebflow/agent/AgentFrozen.scala:422` calls `closePendingInteractionsForInterruptedTurn`, `getOrElse` and `src/main/scala/nebflow/agent/AgentProcessing.scala:955` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18–19 lines × 2) src/main/scala/nebflow/actor/AgentState.scala:922— src/main/scala/nebflow/actor/AgentState.scala:922-939 | src/main/scala/nebflow/agent/AgentActor.scala:1096-1114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentActor.scala:1096` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18–19 lines × 2) src/main/scala/nebflow/core/tools/MailTool.scala:1634— src/main/scala/nebflow/core/tools/MailTool.scala:1634-1651 | src/main/scala/nebflow/core/tools/MailTool.scala:1977-1995 — 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 `src/main/scala/nebflow/core/tools/MailTool.scala:1634` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/core/tools/MailTool.scala:1975` calls `get`, `Some`, `pure` and `src/main/scala/nebflow/core/tools/MailTool.scala:1633` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16–17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2682— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2682-2698 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:338-353 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (16–17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3283— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3283-3299 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1220-1235 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:478— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:478-491 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:354-370 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:478` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4074— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4074-4087 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:1034-1050 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4074` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–15 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:218— src/main/scala/nebflow/agent/AgentFrozen.scala:218-232 | src/main/scala/nebflow/agent/AgentFrozen.scala:293-300 — 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 `src/main/scala/nebflow/agent/AgentFrozen.scala:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–15 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:372— src/main/scala/nebflow/agent/AgentFrozen.scala:372-379 | src/main/scala/nebflow/agent/AgentIdle.scala:232-246 — 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 (12–14 lines × 2) src/main/scala/nebflow/gateway/SttService.scala:271— src/main/scala/nebflow/gateway/SttService.scala:271-284 | src/main/scala/nebflow/gateway/SttService.scala:338-349 — 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 `src/main/scala/nebflow/gateway/SttService.scala:271` 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 (12–14 lines × 2) src/main/scala/nebflow/social/FeishuScanBind.scala:128— src/main/scala/nebflow/social/FeishuScanBind.scala:128-141 | src/main/scala/nebflow/social/WeixinIlinkScanBind.scala:118-129 — before extracting anything, compare `src/main/scala/nebflow/social/FeishuScanBind.scala` and `src/main/scala/nebflow/social/WeixinIlinkScanBind.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4643— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4643-4651 | src/main/scala/nebflow/gateway/AuthRoutes.scala:600-611 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–12 lines × 2) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1526— src/main/scala/nebflow/core/tools/NodeEditTool.scala:1526-1534 | src/main/scala/nebflow/core/tools/NodeEditTool.scala:2875-2886 — 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 `src/main/scala/nebflow/core/tools/NodeEditTool.scala:1526` 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 (10–11 lines × 2) src/main/scala/nebflow/core/tools/BashTool.scala:1193— src/main/scala/nebflow/core/tools/BashTool.scala:1193-1202 | src/main/scala/nebflow/core/tools/GenerateImageTool.scala:167-177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/GenerateImageTool.scala:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:182— src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:182-192 | src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:312-321 — 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 `src/main/scala/nebflow/dropbox/DropboxChunkTransports.scala:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) src/main/scala/nebflow/agent/AgentFrozen.scala:493— src/main/scala/nebflow/agent/AgentFrozen.scala:493-502 | src/main/scala/nebflow/agent/AgentIdle.scala:1042-1052 | src/main/scala/nebflow/agent/AgentProcessing.scala:1017-1026 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentIdle.scala:1042` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/agent/AgentFrozen.scala:492` calls `updateRegistryEscalation` and `src/main/scala/nebflow/agent/AgentProcessing.scala:1016` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:97— src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:97-106 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:120-129 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:167-176 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/main/scala/nebflow/core/McpToolGate.scala:355— src/main/scala/nebflow/core/McpToolGate.scala:355-363 | src/main/scala/nebflow/core/McpToolGate.scala:367-375 | src/main/scala/nebflow/core/McpToolGate.scala:377-385 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) src/main/scala/nebflow/core/tools/AskTools.scala:184— src/main/scala/nebflow/core/tools/AskTools.scala:184-192 | src/main/scala/nebflow/core/tools/DelegateReportTool.scala:60-70 | src/main/scala/nebflow/core/tools/TaskTool.scala:292-302 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AskTools.scala:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1179— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1179-1186 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3707-3714 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1765-1772 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:392-399 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) src/main/scala/nebflow/core/tools/AskTools.scala:184— src/main/scala/nebflow/core/tools/AskTools.scala:184-191 | src/main/scala/nebflow/core/tools/TaskBoardTool.scala:348-356 | src/main/scala/nebflow/core/tools/TaskBoardTool.scala:361-369 | src/main/scala/nebflow/core/tools/TaskTool.scala:266-274 — there are 4 copies across 3 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AskTools.scala:184` 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 (6–8 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:66— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:66-71 | src/main/scala/nebflow/llm/interface.scala:84-91 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6–8 lines × 2) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:514— src/main/scala/nebflow/core/tools/RemoteExecutor.scala:514-519 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:559-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 6) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889-2894 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2923-2928 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2981-2986 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:950-955 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:991-996 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1056-1061 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 6) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2209— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2209-2214 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2223-2228 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2249-2254 | src/main/scala/nebflow/gateway/SocialRoutes.scala:827-832 | src/main/scala/nebflow/gateway/SocialRoutes.scala:843-848 | src/main/scala/nebflow/gateway/SocialRoutes.scala:871-876 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (73 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1034— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1034 · src/main/resources/web/js/explorer.js:1397 — 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 (73 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1374— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1374 · REDACTED:1559 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (55 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1451— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1451 · src/main/resources/web/js/explorer.js:1832 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (55 lines × 2 locations) scripts/e2e-perm-default.mjs:71— scripts/e2e-perm-default.mjs:71 · scripts/e2e-plugin-surface-live.mjs:50 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (44 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:911— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:911 · src/main/resources/web/js/explorer.js:1213 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (44 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1306— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1306 · REDACTED:1475 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (42 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1583— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1583 · src/main/resources/web/js/explorer.js:1975 — 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 (42 lines × 2 locations) scripts/e2e-dispatcher-context-catalog.mjs:123— scripts/e2e-dispatcher-context-catalog.mjs:123 · scripts/e2e-plugin-surface-live.mjs:211 — 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 (31 lines × 2 locations) scripts/smoke-agentcontrol-ws.mjs:31— scripts/smoke-agentcontrol-ws.mjs:31 · scripts/smoke-scheduled-task.mjs:60 — 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 (31 lines × 2 locations) src/main/resources/web/js/bgAgentPopup.js:1040— src/main/resources/web/js/bgAgentPopup.js:1040 · src/main/resources/web/js/flowAgentPopup.js:556 — 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.
X14 · Bypassable address classification· IP classification is bypassable through an IPv4-in-IPv6 embedding · ×2
IP classification is bypassable through an IPv4-in-IPv6 embedding src/main/scala/nebflow/gateway/RestApiCtx.scala:292— This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 291) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 292 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright.
IP classification is bypassable through an IPv4-in-IPv6 embedding evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3859— This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 3858) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 3859 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track src/main/resources/web/js/viewers/video.js:52— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
Empty <h1> heading bing2.html:21— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC3 · Page structure· Heading level jumps from h2 to h4 · ×1
Heading level jumps from h2 to h4 bing2.html:47— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Multiple navigation landmarks without distinguishing labels reports/20261020_184500_mobile-mockup-375__delegate-nebflow-74eb4637.html:2— With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled.
AC4 · Keyboard semantics· Anchor without href · ×1
Anchor without href bing2.html:47— 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.
AC4 · Keyboard semantics· Link used as a button (placeholder href) · ×1
Link used as a button (placeholder href) reports/20261019_203500_wiki-graph-ux-redesign__delegate-nebflow-5ccd5236.html:372— An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
Low contrast colour pair in CSS (4.4:1) reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:93— `.avx .cam` sets color: #81838a on background-color: #1c1f27 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.7:1) reports/20261020_081636_mobile-mockup-375-v3.6__delegate-nebflow-74eb4637.html:116— `.ibar .cbtn.stop` sets color: #fff on background-color: #f44336 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
WebSocketRoutes.handleMessage (cyclomatic 498) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1262— WebSocketRoutes.handleMessage has cyclomatic complexity 498 (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.
RestApiRoutes.routes (cyclomatic 407) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:71— RestApiRoutes.routes has cyclomatic complexity 407 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PresenceRoutes.routes (cyclomatic 354) src/main/scala/nebflow/gateway/PresenceRoutes.scala:205— PresenceRoutes.routes has cyclomatic complexity 354 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NodeEditTool.editNode (cyclomatic 231) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1803— NodeEditTool.editNode has cyclomatic complexity 231 (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.
RestApiRoutes.presenceWsRoutes (cyclomatic 188) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586— RestApiRoutes.presenceWsRoutes has cyclomatic complexity 188 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AgentProcessing.processing (cyclomatic 187) src/main/scala/nebflow/agent/AgentProcessing.scala:39— AgentProcessing.processing has cyclomatic complexity 187 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowDagExecutor.execute (cyclomatic 177) src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:139— FlowDagExecutor.execute has cyclomatic complexity 177 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkRoutes.routes (cyclomatic 176) src/main/scala/nebflow/gateway/NeblinkRoutes.scala:56— NeblinkRoutes.routes has cyclomatic complexity 176 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SocialRoutes.routes (cyclomatic 148) src/main/scala/nebflow/gateway/SocialRoutes.scala:29— SocialRoutes.routes has cyclomatic complexity 148 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AgentIdle.idle (cyclomatic 145) src/main/scala/nebflow/agent/AgentIdle.scala:85— AgentIdle.idle has cyclomatic complexity 145 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
showOptions (cyclomatic 134) src/main/resources/web/js/chat.js:2248— showOptions has cyclomatic complexity 134 (threshold 15). Most of this is not in the body itself: 8 of the 134 points are its own statements and the rest belongs to 49 function items inside it that branch (a function literal at line 2336, a function literal at line 2483, onclick, …). 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.
persistence.buildHistoryRow (cyclomatic 109) src/main/resources/web/js/persistence.js:1017— persistence.buildHistoryRow has cyclomatic complexity 109 (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.
input.initInput (cyclomatic 107) src/main/resources/web/js/input.js:1567— input.initInput has cyclomatic complexity 107 (threshold 15). Most of this is not in the body itself: 15 of the 107 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 1738, a function literal at line 1695, a function literal at line 1940, …). 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.
bindSettingsEvents (cyclomatic 105) REDACTED:1294— bindSettingsEvents has cyclomatic complexity 105 (threshold 15). Most of this is not in the body itself: 10 of the 105 points are its own statements and the rest belongs to 41 function items inside it that branch (a function literal at line 1437, sendSttConfig, a function literal at line 1475, …). 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.
input.send (cyclomatic 101) src/main/resources/web/js/input.js:192— input.send has cyclomatic complexity 101 (threshold 15). Of this number, 77 points are the body's own statements and 24 belong to 8 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.
persistence.restoreFromStorage (cyclomatic 94) src/main/resources/web/js/persistence.js:618— persistence.restoreFromStorage has cyclomatic complexity 94 (threshold 15). Most of this is not in the body itself: 4 of the 94 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 627, 999, 1000, …). 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.
AgentSessionExecution.pipeLlmCall (cyclomatic 93) src/main/scala/nebflow/agent/AgentSessionExecution.scala:538— AgentSessionExecution.pipeLlmCall has cyclomatic complexity 93 (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.
NodeEditTool.call (cyclomatic 92) src/main/scala/nebflow/core/tools/NodeEditTool.scala:372— NodeEditTool.call has cyclomatic complexity 92 (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.
NodeEditTool.proceed (cyclomatic 90) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1125— NodeEditTool.proceed has cyclomatic complexity 90 (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.
canvas.bindDeckInput (cyclomatic 87) src/main/resources/web/js/canvas.js:3002— canvas.bindDeckInput has cyclomatic complexity 87 (threshold 15). Most of this is not in the body itself: 2 of the 87 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 3011, a function literal at line 3054, endPanelDrag, …). 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.
GatewayMain.runGateway (cyclomatic 83) src/main/scala/nebflow/gateway/GatewayMain.scala:382— GatewayMain.runGateway has cyclomatic complexity 83 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ws.connect (cyclomatic 83) REDACTED:1017— ws.connect has cyclomatic complexity 83 (threshold 15). Of this number, 22 points are the body's own statements and 61 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PluginRegistry.loadPlugin (cyclomatic 80) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:585— PluginRegistry.loadPlugin has cyclomatic complexity 80 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PortalWireCodec.decodeBody (cyclomatic 80) src/main/scala/nebflow/neblink/PortalWireCodec.scala:214— PortalWireCodec.decodeBody has cyclomatic complexity 80 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
canvas.deckFrame (cyclomatic 80) src/main/resources/web/js/canvas.js:2536— canvas.deckFrame has cyclomatic complexity 80 (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.
BackoffSupervisor.active (cyclomatic 79) src/main/scala/nebflow/agent/BackoffSupervisor.scala:133— BackoffSupervisor.active has cyclomatic complexity 79 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentFrozen.frozen (cyclomatic 78) src/main/scala/nebflow/agent/AgentFrozen.scala:145— AgentFrozen.frozen has cyclomatic complexity 78 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
delegateFlowMap.buildDelegateFm (cyclomatic 77) src/main/resources/web/js/delegateFlowMap.js:72— delegateFlowMap.buildDelegateFm has cyclomatic complexity 77 (threshold 15). Of this number, 73 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
renderDetail (cyclomatic 77) src/main/resources/web/js/flowMapArchive.js:929— renderDetail has cyclomatic complexity 77 (threshold 15). Of this number, 71 points are the body's own statements and 6 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.
canvas.openWorkspaceItem (cyclomatic 76) src/main/resources/web/js/canvas.js:1274— canvas.openWorkspaceItem has cyclomatic complexity 76 (threshold 15). Of this number, 73 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LlmInterface.createLlm (cyclomatic 73) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:358— LlmInterface.createLlm has cyclomatic complexity 73 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.routes (cyclomatic 73) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1035— WebSocketRoutes.routes has cyclomatic complexity 73 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
chat.renderTool (cyclomatic 73) src/main/resources/web/js/chat.js:932— chat.renderTool has cyclomatic complexity 73 (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.
dropbox.initDropbox (cyclomatic 72) src/main/resources/web/js/dropbox.js:862— dropbox.initDropbox has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 1 of the 72 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 940, 968, 996, …). 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.
(anonymous) (cyclomatic 72) src/main/resources/web/js/main.js:4486— (anonymous) has cyclomatic complexity 72 (threshold 15). Of this number, 69 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ExternalSessionRunner.settle (cyclomatic 71) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:491— ExternalSessionRunner.settle has cyclomatic complexity 71 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
bgTaskRowHtml (cyclomatic 68) src/main/resources/web/js/main/bgAgents.js:464— bgTaskRowHtml has cyclomatic complexity 68 (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.
openProjectsCreateDialog (cyclomatic 66) src/main/resources/web/js/projectTab.js:235— openProjectsCreateDialog has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 1 of the 66 points is its own statement and the rest belongs to 37 function items inside it that branch (a function literal at line 453, showErrorResult, renderDeviceUI, …). 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.
viewMarkdown (cyclomatic 66) src/main/resources/web/js/viewers/markdown.js:528— viewMarkdown has cyclomatic complexity 66 (threshold 15). Of this number, 18 points are the body's own statements and 48 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentFinishTurn.finishTurnCont (cyclomatic 65) src/main/scala/nebflow/agent/AgentFinishTurn.scala:205— AgentFinishTurn.finishTurnCont has cyclomatic complexity 65 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
fmNodeCard.nodeHtml (cyclomatic 64) src/main/resources/web/js/fmNodeCard.js:260— fmNodeCard.nodeHtml has cyclomatic complexity 64 (threshold 15). Of this number, 63 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.
historyReplay.replayHistoryPageInitialLoad (cyclomatic 64) src/main/resources/web/js/chat/historyReplay.js:44— historyReplay.replayHistoryPageInitialLoad has cyclomatic complexity 64 (threshold 15). Of this number, 60 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cyclomatic 63) src/main/resources/web/js/main.js:1289— (anonymous) has cyclomatic complexity 63 (threshold 15). Of this number, 62 points are the body's own statements and 1 belongs 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.
connect::onmessage (cyclomatic 63) REDACTED:1167— connect::onmessage has cyclomatic complexity 63 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.frame (cyclomatic 61) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:1014— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.frame has cyclomatic complexity 61 (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.
wikiGraph.draw (cyclomatic 61) src/main/resources/web/js/wikiGraph.js:1042— wikiGraph.draw has cyclomatic complexity 61 (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.
reference.makeReference (cyclomatic 60) src/main/resources/web/js/reference.js:102— reference.makeReference has cyclomatic complexity 60 (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.
attachInlineImage (cyclomatic 60) REDACTED:2162— attachInlineImage has cyclomatic complexity 60 (threshold 15). Of this number, 37 points are the body's own statements and 23 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
viewPptx (cyclomatic 56) REDACTED:234— viewPptx has cyclomatic complexity 56 (threshold 15). Of this number, 39 points are the body's own statements and 17 belong to 18 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
validate_plugin.main (cyclomatic 55) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:1027— validate_plugin.main has cyclomatic complexity 55 (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.
rebuildSim (cyclomatic 55) src/main/resources/web/js/wikiGraph.js:658— rebuildSim has cyclomatic complexity 55 (threshold 15). Of this number, 49 points are the body's own statements and 6 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
popMediaIndex.indexMedia (cyclomatic 54) src/main/resources/web/js/popMediaIndex.js:61— popMediaIndex.indexMedia has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 5 of the 54 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 103, a function literal at line 68, a function literal at line 76, …). 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.
attachStructureArchive (cyclomatic 54) src/main/resources/web/js/delegateChainView.js:664— attachStructureArchive has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 5 of the 54 points are its own statements and the rest belongs to 23 function items inside it that branch (loadRows, a function literal at line 856, a function literal at line 703, …). 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.
attachPreviewField.selfTest (cyclomatic 53) src/main/resources/web/js/attachPreviewField.js:423— attachPreviewField.selfTest has cyclomatic complexity 53 (threshold 15). Of this number, 45 points are the body's own statements and 8 belong to 2 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.
renderChatModal (cyclomatic 53) REDACTED:1112— renderChatModal has cyclomatic complexity 53 (threshold 15). Of this number, 19 points are the body's own statements and 34 belong to 27 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebSocketRoutes.routes (cyclomatic 52) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:756— WebSocketRoutes.routes has cyclomatic complexity 52 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
delegateChainView.renderStructureBody (cyclomatic 52) src/main/resources/web/js/delegateChainView.js:320— delegateChainView.renderStructureBody has cyclomatic complexity 52 (threshold 15). Of this number, 34 points are the body's own statements and 18 belong to 8 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.
DoctorRun.run (cyclomatic 51) src/main/scala/nebflow/cli/SystemCommands.scala:438— DoctorRun.run has cyclomatic complexity 51 (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.
ProjectsRoutes.routes (cyclomatic 51) src/main/scala/nebflow/gateway/ProjectsRoutes.scala:24— ProjectsRoutes.routes has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
paper-download.main (cyclomatic 51) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:200— paper-download.main has cyclomatic complexity 51 (threshold 15). Of this number, 45 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
buildGroupSettings (cyclomatic 51) src/main/resources/web/js/friendGroups.js:518— buildGroupSettings has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 7 of the 51 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 701, a function literal at line 602, a function literal at line 753, …). 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.
FlowDagCompiler.validate (cyclomatic 50) src/main/scala/nebflow/core/entity/FlowDagCompiler.scala:69— FlowDagCompiler.validate has cyclomatic complexity 50 (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.
chrome-session.main (cyclomatic 50) src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:77— chrome-session.main has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
input.dispatchQueuedItemNow (cyclomatic 50) src/main/resources/web/js/input.js:1352— input.dispatchQueuedItemNow has cyclomatic complexity 50 (threshold 15). Of this number, 42 points are the body's own statements and 8 belong to 6 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.
AgentStreamEvent.toJson (cyclomatic 49) src/main/scala/nebflow/actor/AgentEvent.scala:256— AgentStreamEvent.toJson has cyclomatic complexity 49 (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.
SecretsRoutes.routes (cyclomatic 49) src/main/scala/nebflow/gateway/SecretsRoutes.scala:29— SecretsRoutes.routes has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
delegateChainStub.chainFromStoreRecord (cyclomatic 49) src/main/resources/web/js/delegateChainStub.js:264— delegateChainStub.chainFromStoreRecord has cyclomatic complexity 49 (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.
buildChainHeaderRow (cyclomatic 49) src/main/resources/web/js/taskList.js:523— buildChainHeaderRow has cyclomatic complexity 49 (threshold 15). Of this number, 40 points are the body's own statements and 9 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.
ConfigRoutes.routes (cyclomatic 48) src/main/scala/nebflow/gateway/ConfigRoutes.scala:24— ConfigRoutes.routes has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LlmInterface.createLlm (cyclomatic 48) src/main/scala/nebflow/llm/interface.scala:392— LlmInterface.createLlm has cyclomatic complexity 48 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
renderBgAgentDropdown (cyclomatic 48) src/main/resources/web/js/main/bgAgents.js:683— renderBgAgentDropdown has cyclomatic complexity 48 (threshold 15). Of this number, 21 points are the body's own statements and 27 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
delegateCard (cyclomatic 48) src/main/resources/web/js/delegatePanoramaView.js:672— delegateCard has cyclomatic complexity 48 (threshold 15). Of this number, 37 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DelegateTerminal.onCompleted (cyclomatic 47) src/main/scala/nebflow/core/delegate/DelegateTerminal.scala:86— DelegateTerminal.onCompleted has cyclomatic complexity 47 (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.
canvas.deckMakeCardEl (cyclomatic 47) src/main/resources/web/js/canvas.js:2051— canvas.deckMakeCardEl has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 13 of the 47 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 2133, a function literal at line 2104, a function literal at line 2111, …). 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.
messages.sendCurrent (cyclomatic 47) REDACTED:4185— messages.sendCurrent has cyclomatic complexity 47 (threshold 15). Of this number, 46 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.
chatSearch.runSearch (cyclomatic 47) src/main/resources/web/js/chatSearch.js:1194— chatSearch.runSearch has cyclomatic complexity 47 (threshold 15). Of this number, 41 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
initChatSearch (cyclomatic 47) src/main/resources/web/js/chatSearch.js:127— initChatSearch has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 6 of the 47 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 200, 248, 214, …). 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.
TaskStuckWatcher.recoverUngated (cyclomatic 46) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1093— TaskStuckWatcher.recoverUngated has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flowMapTab.foldView (cyclomatic 46) src/main/resources/web/js/flowMapTab.js:1229— flowMapTab.foldView has cyclomatic complexity 46 (threshold 15). Of this number, 39 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
perception.openMailEditor (cyclomatic 46) src/main/resources/web/js/perception.js:751— perception.openMailEditor has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 15 of the 46 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 977, a function literal at line 872, a function literal at line 926, …). 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.
renderSettings (cyclomatic 45) REDACTED:842— renderSettings has cyclomatic complexity 45 (threshold 15). Of this number, 32 points are the body's own statements and 13 belong to 16 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
canvasDrop.initCanvasDrop (cyclomatic 44) src/main/resources/web/js/canvasDrop.js:488— canvasDrop.initCanvasDrop has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to 9 function items inside it that branch (overRect, a function literal at line 539, a function literal at line 567, …). 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.
FriendMessageTool.call (cyclomatic 43) src/main/scala/nebflow/core/tools/FriendMessageTool.scala:611— FriendMessageTool.call has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RemoteBgOutputLog.scan (cyclomatic 43) src/main/scala/nebflow/core/tools/RemoteBgOutputLog.scala:57— RemoteBgOutputLog.scan has cyclomatic complexity 43 (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.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.makeCardEl (cyclomatic 43) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:875— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.makeCardEl has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 4 of the 43 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 905, a function literal at line 890, endCardDrag, …). 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.
input.sendImmediate (cyclomatic 43) src/main/resources/web/js/input.js:1127— input.sendImmediate has cyclomatic complexity 43 (threshold 15). Of this number, 35 points are the body's own statements and 8 belong to 6 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.
askDock.consumeFrame (cyclomatic 43) src/main/resources/web/js/askDock.js:364— askDock.consumeFrame has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluginRegistry.validateServerEntry (cyclomatic 42) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:977— PluginRegistry.validateServerEntry has cyclomatic complexity 42 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
delegateChainStub.rowFromRegistry (cyclomatic 42) src/main/resources/web/js/delegateChainStub.js:201— delegateChainStub.rowFromRegistry has cyclomatic complexity 42 (threshold 15). Of this number, 41 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.
bgAgentWorkStrip.renderStrip (cyclomatic 42) src/main/resources/web/js/bgAgentWorkStrip.js:120— bgAgentWorkStrip.renderStrip has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bgAgentPopup.openStepPopup (cyclomatic 42) src/main/resources/web/js/bgAgentPopup.js:402— bgAgentPopup.openStepPopup has cyclomatic complexity 42 (threshold 15). Of this number, 38 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mountDelegateStrip (cyclomatic 42) src/main/resources/web/js/bgAgentPopup.js:145— mountDelegateStrip has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 3 of the 42 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 219, 231, …). 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.
wikiGraph.bindCanvas (cyclomatic 41) src/main/resources/web/js/wikiGraph.js:1268— wikiGraph.bindCanvas has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 1286, endDrag, a function literal at line 1271, …). 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.
(anonymous) (cyclomatic 41) src/main/resources/web/js/main.js:2126— (anonymous) has cyclomatic complexity 41 (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.
bindSettingsEvents (cyclomatic 41) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1267— bindSettingsEvents has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 4 of the 41 points are its own statements and the rest belongs to 29 function items inside it that branch (a function literal at line 1306, sendSttConfig, a function literal at line 1402, …). 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.
bindSectionBody (cyclomatic 41) src/main/resources/web/js/sidebar/imagegenSection.js:175— bindSectionBody has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 3 of the 41 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 217, 194, 210, …). 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.
navController.initCardHeadTouch (cyclomatic 40) src/main/resources/web/js/mobile/navController.js:321— navController.initCardHeadTouch has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 8 function items inside it that branch (finish, a function literal at line 379, a function literal at line 337, …). 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.
MailTool.deliverShortNameUnscoped (cyclomatic 39) src/main/scala/nebflow/core/tools/MailTool.scala:1938— MailTool.deliverShortNameUnscoped has cyclomatic complexity 39 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Fallback.classifyBase (cyclomatic 39) src/main/scala/nebflow/llm/fallback.scala:244— Fallback.classifyBase has cyclomatic complexity 39 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
agentManager.renderAgentDetail (cyclomatic 39) src/main/resources/web/js/agentManager.js:274— agentManager.renderAgentDetail has cyclomatic complexity 39 (threshold 15). Of this number, 21 points are the body's own statements and 18 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chatSearch.onModalKeydown (cyclomatic 39) src/main/resources/web/js/chatSearch.js:617— chatSearch.onModalKeydown has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bgAgents.bgDelegateGroups (cyclomatic 39) src/main/resources/web/js/main/bgAgents.js:399— bgAgents.bgDelegateGroups has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
onFriendEvent (cyclomatic 39) REDACTED:4759— onFriendEvent has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Fallback.classifyError (cyclomatic 38) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:112— Fallback.classifyError has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
check_wiki_docs.check (cyclomatic 38) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:376— check_wiki_docs.check has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
delegatePanoramaView.buildCanvas (cyclomatic 38) src/main/resources/web/js/delegatePanoramaView.js:392— delegatePanoramaView.buildCanvas has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentSessionExecution.pipeToolExecutions (cyclomatic 37) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1201— AgentSessionExecution.pipeToolExecutions has cyclomatic complexity 37 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BashTool.doCall (cyclomatic 37) src/main/scala/nebflow/core/tools/BashTool.scala:460— BashTool.doCall 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.
WebSocketRoutes.handleMessage (cyclomatic 37) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1876— WebSocketRoutes.handleMessage 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.
chat.renderPermissionPrompt (cyclomatic 37) src/main/resources/web/js/chat.js:3407— chat.renderPermissionPrompt has cyclomatic complexity 37 (threshold 15). Of this number, 22 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
canvas.initCanvas (cyclomatic 37) src/main/resources/web/js/canvas.js:3831— canvas.initCanvas has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 3852, 3876, 3900, …). 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.
attachStripFold.syncAttachmentStrip (cyclomatic 37) src/main/resources/web/js/attachStripFold.js:28— attachStripFold.syncAttachmentStrip has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlowDagExecutor.executeAgent (cyclomatic 36) src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:1127— FlowDagExecutor.executeAgent has cyclomatic complexity 36 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentControlTool.doList (cyclomatic 36) src/main/scala/nebflow/core/tools/AgentControlTool.scala:491— AgentControlTool.doList has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.frame (cyclomatic 36) reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:924— 20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.frame has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.frame (cyclomatic 36) reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:929— 20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.frame has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
html.viewHtml (cyclomatic 36) REDACTED:436— html.viewHtml has cyclomatic complexity 36 (threshold 15). Of this number, 19 points are the body's own statements and 17 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
attachImagePreview.makePreviewFrame (cyclomatic 36) src/main/resources/web/js/attachImagePreview.js:293— attachImagePreview.makePreviewFrame has cyclomatic complexity 36 (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.
contacts.buildResultCard (cyclomatic 36) src/main/resources/web/js/contacts.js:843— contacts.buildResultCard has cyclomatic complexity 36 (threshold 15). Of this number, 18 points are the body's own statements and 18 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wiki-graph-redesign-sample.html.draw (cyclomatic 35) docs/design/wiki-graph-redesign-sample.html:346— wiki-graph-redesign-sample.html.draw has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lib.pageState (cyclomatic 35) REDACTED:442— lib.pageState has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
chatQueue.renderQueueBar (cyclomatic 35) src/main/resources/web/js/chatQueue.js:16— chatQueue.renderQueueBar has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 66, 106, 142, …). 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.
voiceEngine.startDictation (cyclomatic 35) src/main/resources/web/js/voiceEngine.js:511— voiceEngine.startDictation has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 566, 611, 626, …). 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.
chat.renderAskUser (cyclomatic 35) src/main/resources/web/js/chat.js:3021— chat.renderAskUser has cyclomatic complexity 35 (threshold 15). Of this number, 24 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
delegatePanoramaView.buildEdges (cyclomatic 35) src/main/resources/web/js/delegatePanoramaView.js:920— delegatePanoramaView.buildEdges has cyclomatic complexity 35 (threshold 15). Of this number, 24 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskList.chainMembersOf (cyclomatic 35) src/main/resources/web/js/taskList.js:303— taskList.chainMembersOf has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
messages.fetchDeviceMsgsServer (cyclomatic 35) REDACTED:6238— messages.fetchDeviceMsgsServer has cyclomatic complexity 35 (threshold 15). Of this number, 29 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
main.renderBgDropdown::taskRowHtml (cyclomatic 35) src/main/resources/web/js/main.js:3179— main.renderBgDropdown::taskRowHtml has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (main.renderBgDropdown) 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.
PerceptionRoutes.routes (cyclomatic 34) src/main/scala/nebflow/gateway/PerceptionRoutes.scala:21— PerceptionRoutes.routes has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
check_wiki_docs.main (cyclomatic 34) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:610— check_wiki_docs.main 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.
(anonymous) (cyclomatic 34) src/main/resources/web/js/main.js:3540— (anonymous) 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.
AgentSessionExecution.executeToolInner (cyclomatic 33) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2032— AgentSessionExecution.executeToolInner 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.
ChainWriteTool.registerChain (cyclomatic 33) src/main/scala/nebflow/core/tools/ChainWriteTool.scala:317— ChainWriteTool.registerChain 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.
pdf.viewPdf (cyclomatic 33) src/main/resources/web/js/viewers/pdf.js:38— pdf.viewPdf has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 13 of the 33 points are its own statements and the rest belongs to 5 function items inside it that branch (renderAll, scrollToPage, applyScale, …). 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.
popArtifacts.buildMediaStack (cyclomatic 33) src/main/resources/web/js/popArtifacts.js:553— popArtifacts.buildMediaStack has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 11 function items inside it that branch (a function literal at line 737, setExpanded, up, …). 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.
mergeQueueView.mergeQueueView (cyclomatic 33) src/main/resources/web/js/mergeQueueView.js:48— mergeQueueView.mergeQueueView has cyclomatic complexity 33 (threshold 15). Of this number, 19 points are the body's own statements and 14 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
messages.deviceConvs (cyclomatic 33) REDACTED:5770— messages.deviceConvs has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
initInput::onkeydown (cyclomatic 33) src/main/resources/web/js/input.js:1738— initInput::onkeydown 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.
collectEdges (cyclomatic 33) src/main/resources/web/js/flowMapTab.js:778— collectEdges 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.
validate_plugin.check_mcp_json (cyclomatic 32) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:400— validate_plugin.check_mcp_json has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
providersUi.showProviderModal (cyclomatic 32) src/main/resources/web/js/sidebar/providersUi.js:315— providersUi.showProviderModal has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
pptx.nfPptxStageMain (cyclomatic 32) REDACTED:77— pptx.nfPptxStageMain has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 86, 156, 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.
usageDashboard.loadSummary (cyclomatic 32) src/main/resources/web/js/usageDashboard.js:440— usageDashboard.loadSummary has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
usageDashboard.renderSummary (cyclomatic 32) src/main/resources/web/js/usageDashboard.js:597— usageDashboard.renderSummary has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AgentSessionExecution.buildAllowedToolSet (cyclomatic 31) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2271— AgentSessionExecution.buildAllowedToolSet has cyclomatic complexity 31 (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.
DelegateTerminal.classifyDrift (cyclomatic 31) src/main/scala/nebflow/core/delegate/DelegateTerminal.scala:458— DelegateTerminal.classifyDrift has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html.frame (cyclomatic 31) reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:851— 20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html.frame has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flowMapTab.nodeContentKey (cyclomatic 31) src/main/resources/web/js/flowMapTab.js:1551— flowMapTab.nodeContentKey has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
(anonymous) (cyclomatic 31) src/main/resources/web/js/main.js:4431— (anonymous) has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4436, 4437). 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.
LanguageDetector.detectNonEmpty (cyclomatic 30) src/main/scala/nebflow/agent/LanguageDetector.scala:21— LanguageDetector.detectNonEmpty has cyclomatic complexity 30 (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.
FlowTreeActor.restoreTeams (cyclomatic 30) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:576— FlowTreeActor.restoreTeams has cyclomatic complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
sidebar.renderSettings (cyclomatic 30) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:736— sidebar.renderSettings has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
localStore.ensureAvatar (cyclomatic 30) src/main/resources/web/js/localStore.js:1340— localStore.ensureAvatar has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 1352). 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.
flowViewers.loadPendingSection (cyclomatic 30) src/main/resources/web/js/flowViewers.js:215— flowViewers.loadPendingSection has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 248, 222, 233, …). 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.
canvas.deckTypeFamily (cyclomatic 30) src/main/resources/web/js/canvas.js:1689— canvas.deckTypeFamily has cyclomatic complexity 30 (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.
messages.attachmentCard (cyclomatic 30) REDACTED:1897— messages.attachmentCard has cyclomatic complexity 30 (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.
messages.sendDeviceCurrent (cyclomatic 30) REDACTED:6319— messages.sendDeviceCurrent has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
perception.openConfigCard (cyclomatic 30) src/main/resources/web/js/perception.js:411— perception.openConfigCard has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 463, a function literal at line 497, val, …). 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.
AskLiveSources.make (cyclomatic 29) src/main/scala/nebflow/core/ask/AskGatewayServices.scala:124— AskLiveSources.make has cyclomatic complexity 29 (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.
measure.measure (cyclomatic 29) evidence/20261021_console-load-perf/measure.mjs:91— measure.measure has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 105, a function literal at line 145, a function literal at line 138, …). 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.
nfFileCache.nfCachePut (cyclomatic 29) src/main/resources/web/js/nfFileCache.js:316— nfFileCache.nfCachePut has cyclomatic complexity 29 (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.
taskList.chainEdgesOf (cyclomatic 29) src/main/resources/web/js/taskList.js:199— taskList.chainEdgesOf has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
activityBar.showLoginModal (cyclomatic 29) src/main/resources/web/js/activityBar.js:715— activityBar.showLoginModal has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (render, startFlow, a function literal at line 755, …). 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.
daemons.buildRow (cyclomatic 29) src/main/resources/web/js/daemons.js:374— daemons.buildRow has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 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.
usageDashboard.renderHeatmap (cyclomatic 29) src/main/resources/web/js/usageDashboard.js:697— usageDashboard.renderHeatmap has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskPanel.buildCard (cyclomatic 29) src/main/resources/web/js/mobile/taskPanel.js:122— taskPanel.buildCard has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 29) src/main/resources/web/js/explorer.js:1257— (anonymous) has cyclomatic complexity 29 (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.
topologyOf (cyclomatic 29) src/main/resources/web/js/delegatePanoramaView.js:76— topologyOf has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DaemonPanelSchema.indexDocument (cyclomatic 28) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:249— DaemonPanelSchema.indexDocument 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.
nfFileCache.fetchBlobWithProgress (cyclomatic 28) src/main/resources/web/js/nfFileCache.js:697— nfFileCache.fetchBlobWithProgress 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.
markdown.renderWikilinks (cyclomatic 28) src/main/resources/web/js/viewers/markdown.js:277— markdown.renderWikilinks has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
attachments.initGlobalFileDrop (cyclomatic 28) src/main/resources/web/js/input/attachments.js:233— attachments.initGlobalFileDrop has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 273, hasAttach, a function literal at line 249, …). 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.
flowViewers.openDefinition (cyclomatic 28) src/main/resources/web/js/flowViewers.js:340— flowViewers.openDefinition has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 357, globalDescOf, a function literal at line 376, …). 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.
wikiGraph.fillDetailCard (cyclomatic 28) src/main/resources/web/js/wikiGraph.js:1500— wikiGraph.fillDetailCard has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 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.
attachUpload.sendFiles (cyclomatic 28) src/main/resources/web/js/attachUpload.js:605— attachUpload.sendFiles 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.
messages.refreshConversations (cyclomatic 28) REDACTED:447— messages.refreshConversations has cyclomatic complexity 28 (threshold 15). 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, 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.
sidebar.resetChatForActiveSession (cyclomatic 28) REDACTED:2284— sidebar.resetChatForActiveSession has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
renderUserBubble (cyclomatic 28) src/main/resources/web/js/chat.js:460— renderUserBubble has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderHtmlCard (cyclomatic 28) REDACTED:381— renderHtmlCard has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 14 function items inside it that branch (reloadIfBlank, a function literal at line 462, mintForCard, …). 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.
normalizeTopology (cyclomatic 28) src/main/resources/web/js/delegateChainProvider.js:108— normalizeTopology has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 114, 122, 126). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
sidebar.resetChatForActiveSession (cyclomatic 27) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2422— sidebar.resetChatForActiveSession has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nearpath.probeNearPath (cyclomatic 27) REDACTED:91— nearpath.probeNearPath has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
localStore.evict (cyclomatic 27) src/main/resources/web/js/localStore.js:1081— localStore.evict 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.
chatSearch.runStream (cyclomatic 27) src/main/resources/web/js/chatSearch.js:1017— chatSearch.runStream has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 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.
StreamBatching.pipe (cyclomatic 26) src/main/scala/nebflow/agent/AgentStreamPipelines.scala:139— StreamBatching.pipe has cyclomatic complexity 26 (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.
WsSessionChatHandlers.handleSecretAwareAnswer (cyclomatic 26) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:249— WsSessionChatHandlers.handleSecretAwareAnswer has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
paper-download.acquirePdf (cyclomatic 26) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:143— paper-download.acquirePdf has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nfTicket.mintRound (cyclomatic 26) src/main/resources/web/js/nfTicket.js:205— nfTicket.mintRound has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
onboarding.askCard (cyclomatic 26) src/main/resources/web/js/onboarding.js:488— onboarding.askCard has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 489, 606, 536, …). 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.
onboarding.askModelCard (cyclomatic 26) src/main/resources/web/js/onboarding.js:667— onboarding.askModelCard has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 11 function items inside it that branch (probeModelList, a function literal at line 853, ctxValue, …). 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.
input.dispatchOfflineItem (cyclomatic 26) src/main/resources/web/js/input.js:1019— input.dispatchOfflineItem has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to 5 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.
askAttachments.upload (cyclomatic 26) src/main/resources/web/js/askAttachments.js:231— askAttachments.upload has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 255, a function literal at line 246, fail, …). 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.
shared.resolveLocalFiles (cyclomatic 26) src/main/resources/web/js/viewers/shared.js:153— shared.resolveLocalFiles has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (toPath, anchorPath, a function literal at line 200, …). 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.
sendState.claim (cyclomatic 26) src/main/resources/web/js/sendState.js:252— sendState.claim has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
socialPanel.tickSession (cyclomatic 26) src/main/resources/web/js/socialPanel.js:1741— socialPanel.tickSession has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 1749, sessionLive). 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.
LoopGuard.evaluate (cyclomatic 25) src/main/scala/nebflow/core/processor/LoopGuard.scala:169— LoopGuard.evaluate has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CurlTool.call (cyclomatic 25) src/main/scala/nebflow/core/tools/CurlTool.scala:65— CurlTool.call has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GrepTool.runGrep (cyclomatic 25) src/main/scala/nebflow/core/tools/GrepTool.scala:153— GrepTool.runGrep has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NodeTools.verdictRouteGate (cyclomatic 25) src/main/scala/nebflow/core/tools/NodeTools.scala:979— NodeTools.verdictRouteGate has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskListStore.updateSync (cyclomatic 25) src/main/scala/nebflow/core/tools/TaskListTool.scala:611— TaskListStore.updateSync has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DropboxService.uploadAndRelay (cyclomatic 25) src/main/scala/nebflow/dropbox/DropboxService.scala:991— DropboxService.uploadAndRelay has cyclomatic complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AuthAdminRoutes.routes (cyclomatic 25) src/main/scala/nebflow/gateway/AuthAdminRoutes.scala:37— AuthAdminRoutes.routes has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
explorer.initExplorer (cyclomatic 25) src/main/resources/web/js/explorer.js:1375— explorer.initExplorer has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 6 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.
input.hydrateQueueFromVault::run (cyclomatic 25) src/main/resources/web/js/input.js:762— input.hydrateQueueFromVault::run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reference.renderFriendInputRef (cyclomatic 25) src/main/resources/web/js/reference.js:338— reference.renderFriendInputRef has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (toggle, syncExpand, overflowNow). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
neblink.fetchNeblinkStatus (cyclomatic 25) src/main/resources/web/js/neblink.js:296— neblink.fetchNeblinkStatus has cyclomatic complexity 25 (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.
messages.initMessages (cyclomatic 25) REDACTED:5107— messages.initMessages has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 5138, 5170, 5124, …). 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.
ShellSession.runProcess (cyclomatic 24) src/main/scala/nebflow/core/tools/shell.scala:632— ShellSession.runProcess has cyclomatic complexity 24 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TurnEndpoint.runTurn (cyclomatic 24) src/main/scala/nebflow/gateway/TurnEndpoint.scala:57— TurnEndpoint.runTurn has cyclomatic complexity 24 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AnthropicAdapter.processAnthropicEvent (cyclomatic 24) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:622— AnthropicAdapter.processAnthropicEvent 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.
OpenAiAdapter.processOpenAiData (cyclomatic 24) src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:522— OpenAiAdapter.processOpenAiData 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.
validate_plugin.check_c11 (cyclomatic 24) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:554— validate_plugin.check_c11 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.
explorer.initExplorer (cyclomatic 24) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1020— explorer.initExplorer has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 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.
nfFileCache.nfViewerSource (cyclomatic 24) src/main/resources/web/js/nfFileCache.js:517— nfFileCache.nfViewerSource has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 2 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.
workspacePicker.openPicker::renderResult (cyclomatic 24) src/main/resources/web/js/workspacePicker.js:388— workspacePicker.openPicker::renderResult 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.
input.persistQueue (cyclomatic 24) src/main/resources/web/js/input.js:623— input.persistQueue has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
image.viewImage (cyclomatic 24) src/main/resources/web/js/viewers/image.js:16— image.viewImage has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to 9 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.
canvasDrop.handleFiles (cyclomatic 24) src/main/resources/web/js/canvasDrop.js:338— canvasDrop.handleFiles 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.
flowMapTab.layoutNodes (cyclomatic 24) src/main/resources/web/js/flowMapTab.js:670— flowMapTab.layoutNodes has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 679, a function literal at line 709, visit, …). 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.
flowMapTab.renderFlowMap (cyclomatic 24) src/main/resources/web/js/flowMapTab.js:1887— flowMapTab.renderFlowMap has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
delegateChainView.openPane (cyclomatic 24) src/main/resources/web/js/delegateChainView.js:153— delegateChainView.openPane has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
canvas.deckSnapshotSource (cyclomatic 24) src/main/resources/web/js/canvas.js:2195— canvas.deckSnapshotSource 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.
ws.attemptLoopbackNearPath (cyclomatic 24) REDACTED:749— ws.attemptLoopbackNearPath has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
messages.keyedDiff (cyclomatic 24) REDACTED:2986— messages.keyedDiff 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.
messages.openForwardWindow (cyclomatic 24) REDACTED:3995— messages.openForwardWindow has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (syncPick, a function literal at line 4080, onEsc, …). 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.
bgTaskOutputPopup.pollOnce (cyclomatic 24) src/main/resources/web/js/bgTaskOutputPopup.js:465— bgTaskOutputPopup.pollOnce has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bgAgentPopup.interceptBgAgentStep (cyclomatic 24) src/main/resources/web/js/bgAgentPopup.js:662— bgAgentPopup.interceptBgAgentStep has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
updateCard.stateLine (cyclomatic 24) src/main/resources/web/js/updateCard.js:81— updateCard.stateLine 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.
(anonymous) (cyclomatic 24) src/main/resources/web/js/main.js:2321— (anonymous) has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mediaFace (cyclomatic 24) src/main/resources/web/js/popArtifacts.js:302— mediaFace has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to 10 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.
RestApiRoutes.handleAuthCallback (cyclomatic 23) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4375— RestApiRoutes.handleAuthCallback has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentSessionExecution.maybeAutoCompact (cyclomatic 23) src/main/scala/nebflow/agent/AgentSessionExecution.scala:39— AgentSessionExecution.maybeAutoCompact has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AskAnswerLanding.land (cyclomatic 23) src/main/scala/nebflow/agent/AskAnswerLanding.scala:111— AskAnswerLanding.land has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
InteractionHub.complete (cyclomatic 23) src/main/scala/nebflow/agent/InteractionHub.scala:918— InteractionHub.complete has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
McpToolGate.classify (cyclomatic 23) src/main/scala/nebflow/core/McpToolGate.scala:347— McpToolGate.classify has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DelegateTool.spawnWithPlugins (cyclomatic 23) src/main/scala/nebflow/core/tools/DelegateTool.scala:848— DelegateTool.spawnWithPlugins has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MailTool.activateAgent (cyclomatic 23) src/main/scala/nebflow/core/tools/MailTool.scala:2161— MailTool.activateAgent has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AuthRoutes.handleAuthCallback (cyclomatic 23) src/main/scala/nebflow/gateway/AuthRoutes.scala:275— AuthRoutes.handleAuthCallback has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
input.dispatchUserMessageFrames (cyclomatic 23) src/main/resources/web/js/input.js:130— input.dispatchUserMessageFrames has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 2 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.
diffCanvas.renderReader (cyclomatic 23) src/main/resources/web/js/diffCanvas.js:107— diffCanvas.renderReader has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
reference.chipTitle (cyclomatic 23) src/main/resources/web/js/reference.js:456— reference.chipTitle has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
delegateChainProvider.projectRow (cyclomatic 23) src/main/resources/web/js/delegateChainProvider.js:72— delegateChainProvider.projectRow has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cardRegistry.renderWithRegistry (cyclomatic 23) REDACTED:617— cardRegistry.renderWithRegistry has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ws.convertAgentEvent (cyclomatic 23) REDACTED:104— ws.convertAgentEvent has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
messages.fillLocalThumbs (cyclomatic 23) REDACTED:4505— messages.fillLocalThumbs has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 4506). 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.
messages.settleOptimisticAttach (cyclomatic 23) REDACTED:4548— messages.settleOptimisticAttach has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
messages.onDeviceTransferEvent (cyclomatic 23) REDACTED:5264— messages.onDeviceTransferEvent has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
messages.adaptDeviceMessage (cyclomatic 23) REDACTED:5512— messages.adaptDeviceMessage has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bgAgentPopup.handleBgAgentHistory (cyclomatic 23) src/main/resources/web/js/bgAgentPopup.js:771— bgAgentPopup.handleBgAgentHistory has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
secretsPanel.onDocumentClick (cyclomatic 23) src/main/resources/web/js/secretsPanel.js:865— secretsPanel.onDocumentClick has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity· state (cyclomatic 23) · ×1
state (cyclomatic 23) src/main/resources/web/js/canvas.js:3165— state has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chainGateTargets (cyclomatic 23) src/main/resources/web/js/flowMapTab.js:1093— chainGateTargets has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
writeAvatar (cyclomatic 23) src/main/resources/web/js/localStore.js:897— writeAvatar has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
convergeAvatar (cyclomatic 23) src/main/resources/web/js/agentProfile.js:118— convergeAvatar has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 128, (anonymous)::(anonymous)::onload, a function literal at line 135, …). 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.
refresh (cyclomatic 23) src/main/resources/web/js/delegateChainProvider.js:188— refresh has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AgentControlTool.doStatusBody (cyclomatic 22) src/main/scala/nebflow/core/tools/AgentControlTool.scala:699— AgentControlTool.doStatusBody has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentControlTool.doCancel (cyclomatic 22) src/main/scala/nebflow/core/tools/AgentControlTool.scala:862— AgentControlTool.doCancel has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentControlTool.doRestart (cyclomatic 22) src/main/scala/nebflow/core/tools/AgentControlTool.scala:1020— AgentControlTool.doRestart has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WsFileOpsHandlers.handleReadFile (cyclomatic 22) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:275— WsFileOpsHandlers.handleReadFile has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTransferAction.chunkedPut (cyclomatic 22) src/main/scala/nebflow/neblink/FileTransferAction.scala:332— FileTransferAction.chunkedPut has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar.showProviderModal (cyclomatic 22) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1787— sidebar.showProviderModal has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
markdown.onWikilinkClick (cyclomatic 22) src/main/resources/web/js/viewers/markdown.js:452— markdown.onWikilinkClick has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat.renderToolPending (cyclomatic 22) src/main/resources/web/js/chat.js:1208— chat.renderToolPending has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
flowMapTab.applyEdgeDiff (cyclomatic 22) src/main/resources/web/js/flowMapTab.js:1653— flowMapTab.applyEdgeDiff has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
canvas.openTab (cyclomatic 22) src/main/resources/web/js/canvas.js:628— canvas.openTab has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
canvas.retargetFileTabs (cyclomatic 22) src/main/resources/web/js/canvas.js:1057— canvas.retargetFileTabs has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
canvas.ensureCardChannel (cyclomatic 22) src/main/resources/web/js/canvas.js:4043— canvas.ensureCardChannel has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 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.
taskList.pollDelegateProgress (cyclomatic 22) src/main/resources/web/js/taskList.js:945— taskList.pollDelegateProgress has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 962, 953). 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.
attachPreviewField.declarePreviewOf (cyclomatic 22) src/main/resources/web/js/attachPreviewField.js:289— attachPreviewField.declarePreviewOf has cyclomatic complexity 22 (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.
messages.openConversation (cyclomatic 22) REDACTED:925— messages.openConversation has cyclomatic complexity 22 (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.
bgTaskOutputPopup.pollRemoteOnce (cyclomatic 22) src/main/resources/web/js/bgTaskOutputPopup.js:631— bgTaskOutputPopup.pollRemoteOnce has cyclomatic complexity 22 (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.
contacts.render (cyclomatic 22) src/main/resources/web/js/contacts.js:266— contacts.render has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 2 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.
main.renderBgDropdown (cyclomatic 22) src/main/resources/web/js/main.js:3133— main.renderBgDropdown has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (main.renderBgDropdown::taskRowHtml) 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.
runProgressAttempt (cyclomatic 22) src/main/resources/web/js/attachmentPreview.js:394— runProgressAttempt has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs 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.
HealthShow.run (cyclomatic 21) src/main/scala/nebflow/cli/HealthCommand.scala:94— HealthShow.run 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.
FileTaskStore.update (cyclomatic 21) src/main/scala/nebflow/core/task/TaskStore.scala:291— FileTaskStore.update 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.
EditTool.doEdit (cyclomatic 21) src/main/scala/nebflow/core/tools/EditTool.scala:229— EditTool.doEdit 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.
FriendMessageTool.copyLocal (cyclomatic 21) src/main/scala/nebflow/core/tools/FriendMessageTool.scala:551— FriendMessageTool.copyLocal has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MailTool.layeredRoute (cyclomatic 21) src/main/scala/nebflow/core/tools/MailTool.scala:812— MailTool.layeredRoute 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.
ReadTool.readTextFile (cyclomatic 21) src/main/scala/nebflow/core/tools/ReadTool.scala:161— ReadTool.readTextFile has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NfFileRoutes.nfFileRoutes (cyclomatic 21) src/main/scala/nebflow/gateway/NfFileRoutes.scala:225— NfFileRoutes.nfFileRoutes has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WeixinAskLeg.parseReply (cyclomatic 21) src/main/scala/nebflow/social/WeixinAskLeg.scala:273— WeixinAskLeg.parseReply has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
validate_plugin.check_c13 (cyclomatic 21) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:631— validate_plugin.check_c13 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.
paper-download.findPdfTarget (cyclomatic 21) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:74— paper-download.findPdfTarget has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
markdown.resolveWikiTarget (cyclomatic 21) src/main/resources/web/js/viewers/markdown.js:236— markdown.resolveWikiTarget has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
persistence.mountHistoryPageChunked (cyclomatic 21) src/main/resources/web/js/persistence.js:1590— persistence.mountHistoryPageChunked has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
orbPresets.loadSaved (cyclomatic 21) src/main/resources/web/js/orbPresets.js:188— orbPresets.loadSaved 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.
OrbRenderer.drawFrame (cyclomatic 21) src/main/resources/web/js/micOrb.js:892— OrbRenderer.drawFrame 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.
input.recallQueuedItem (cyclomatic 21) src/main/resources/web/js/input.js:1238— input.recallQueuedItem has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
epub.viewEpub (cyclomatic 21) src/main/resources/web/js/viewers/epub.js:16— epub.viewEpub has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
injectedRows.injectedSourceLabel (cyclomatic 21) src/main/resources/web/js/chat/injectedRows.js:139— injectedRows.injectedSourceLabel 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.
chat.finishAi (cyclomatic 21) src/main/resources/web/js/chat.js:742— chat.finishAi 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.
cardRegistry.window.addEventListener("message") (cyclomatic 21) REDACTED:136— cardRegistry.window.addEventListener("message") has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskList.buildChainMemberRow (cyclomatic 21) src/main/resources/web/js/taskList.js:760— taskList.buildChainMemberRow has cyclomatic complexity 21 (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.
dropbox.renderMessage (cyclomatic 21) src/main/resources/web/js/dropbox.js:755— dropbox.renderMessage 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.
messages.groupEventText (cyclomatic 21) REDACTED:408— messages.groupEventText has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
messages.oursBySenderId (cyclomatic 21) REDACTED:2780— messages.oursBySenderId has cyclomatic complexity 21 (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.
chatSearch.normalizeMessage (cyclomatic 21) src/main/resources/web/js/chatSearch.js:907— chatSearch.normalizeMessage has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
flowAgentPopup.applyAgentMeta (cyclomatic 21) src/main/resources/web/js/flowAgentPopup.js:686— flowAgentPopup.applyAgentMeta 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.
appendToolStreamDelta (cyclomatic 21) src/main/resources/web/js/chat.js:1551— appendToolStreamDelta has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 1569). 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.
AgentPingpong.recoverAtIdle (cyclomatic 20) src/main/scala/nebflow/agent/AgentPingpong.scala:685— AgentPingpong.recoverAtIdle has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ContextRefresher.refreshTurn (cyclomatic 20) src/main/scala/nebflow/agent/ContextRefresher.scala:493— ContextRefresher.refreshTurn has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SubAgentStartupRecovery.sweep (cyclomatic 20) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:135— SubAgentStartupRecovery.sweep has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.startFileWatcher (cyclomatic 20) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:741— FlowTreeActor.startFileWatcher 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.
MailTool.call (cyclomatic 20) src/main/scala/nebflow/core/tools/MailTool.scala:626— MailTool.call 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.
MailTool.resolveAndQueue (cyclomatic 20) src/main/scala/nebflow/core/tools/MailTool.scala:1609— MailTool.resolveAndQueue has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NodeEditTool.reclaimAbandonedWorktree (cyclomatic 20) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1756— NodeEditTool.reclaimAbandonedWorktree has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DropboxService.receiveChunkFromPeer (cyclomatic 20) src/main/scala/nebflow/dropbox/DropboxService.scala:1206— DropboxService.receiveChunkFromPeer has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChatRoutes.routes (cyclomatic 20) src/main/scala/nebflow/gateway/ChatRoutes.scala:57— ChatRoutes.routes has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RegistryRoutes.routes (cyclomatic 20) src/main/scala/nebflow/gateway/RegistryRoutes.scala:23— RegistryRoutes.routes has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MailClient.send (cyclomatic 20) src/main/scala/nebflow/perception/MailClient.scala:420— MailClient.send has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PerceptionCore.connectAccount (cyclomatic 20) src/main/scala/nebflow/perception/PerceptionService.scala:509— PerceptionCore.connectAccount has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
validate_plugin.check_c14 (cyclomatic 20) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:692— validate_plugin.check_c14 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.
check_wiki_docs.build_paragraphs (cyclomatic 20) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:234— check_wiki_docs.build_paragraphs 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.
sidebar.loadPresetsSection (cyclomatic 20) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1016— sidebar.loadPresetsSection has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 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.
mockup.html.content.addEventListener("pointerdown") (cyclomatic 20) reports/20261027_220000_mobile-canvas-ux/mockup.html:350— mockup.html.content.addEventListener("pointerdown") has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (mv, up). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RcChargeSteps.RcChargeSteps (cyclomatic 20) src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/src/RcChargeSteps.tsx:92— RcChargeSteps.RcChargeSteps has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
markdown.analyzeSource (cyclomatic 20) src/main/resources/web/js/viewers/markdown.js:81— markdown.analyzeSource has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
explorer.startCreateNode (cyclomatic 20) src/main/resources/web/js/explorer.js:1524— explorer.startCreateNode has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inputModes.updateInputIndicator (cyclomatic 20) src/main/resources/web/js/input/inputModes.js:25— inputModes.updateInputIndicator 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.
delegateChainStub.__setFixture (cyclomatic 20) src/main/resources/web/js/delegateChainStub.js:502— delegateChainStub.__setFixture has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flowMapTab.rerenderFlowMap (cyclomatic 20) src/main/resources/web/js/flowMapTab.js:201— flowMapTab.rerenderFlowMap 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.
wikiGraph.renderInto (cyclomatic 20) src/main/resources/web/js/wikiGraph.js:224— wikiGraph.renderInto has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wikiGraph.openDoc (cyclomatic 20) src/main/resources/web/js/wikiGraph.js:1656— wikiGraph.openDoc 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.
dropbox.handleFilesSelected (cyclomatic 20) src/main/resources/web/js/dropbox.js:553— dropbox.handleFilesSelected has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
dropbox.keyedDiffMessages (cyclomatic 20) src/main/resources/web/js/dropbox.js:678— dropbox.keyedDiffMessages 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.
messages.convRow (cyclomatic 20) REDACTED:603— messages.convRow has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
usageDashboard.renderCurveBars (cyclomatic 20) src/main/resources/web/js/usageDashboard.js:899— usageDashboard.renderCurveBars has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
socialPanel.saveChannel (cyclomatic 20) src/main/resources/web/js/socialPanel.js:1278— socialPanel.saveChannel 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.
showEdgeTip (cyclomatic 20) src/main/resources/web/js/wikiGraph.js:1445— showEdgeTip 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.
revealRow (cyclomatic 20) src/main/resources/web/js/secretsPanel.js:564— revealRow has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 592, 604). 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.
buildFriendPicker (cyclomatic 20) src/main/resources/web/js/friendGroups.js:309— buildFriendPicker has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 316, 318, 337, …). 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.
refMentionText (cyclomatic 20) src/main/resources/web/js/reference.js:218— refMentionText 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.
showProviderModal::onConfirm (cyclomatic 20) src/main/resources/web/js/sidebar/providersUi.js:339— showProviderModal::onConfirm 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.
openPicker (cyclomatic 20) src/main/resources/web/js/workspacePicker.js:144— openPicker 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.
UpdateRun.twoPhaseLocal (cyclomatic 19) src/main/scala/nebflow/cli/SystemCommands.scala:97— UpdateRun.twoPhaseLocal has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AgentControlTool.withGuardedRecord (cyclomatic 19) src/main/scala/nebflow/core/tools/AgentControlTool.scala:337— AgentControlTool.withGuardedRecord 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.
DropboxService.handleFileComplete (cyclomatic 19) src/main/scala/nebflow/dropbox/DropboxService.scala:1569— DropboxService.handleFileComplete 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.
RefResolver.resolve (cyclomatic 19) src/main/scala/nebflow/gateway/RefResolver.scala:55— RefResolver.resolve 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.
WsFileOpsHandlers.readRemoteFile (cyclomatic 19) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:410— WsFileOpsHandlers.readRemoteFile has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
FriendService.dispatchPull (cyclomatic 19) src/main/scala/nebflow/neblink/FriendService.scala:640— FriendService.dispatchPull has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkRelayTunnel.handleAuthRejection (cyclomatic 19) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:626— NeblinkRelayTunnel.handleAuthRejection has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Inbound.toJson (cyclomatic 19) src/main/scala/nebflow/social/FeishuMessage.scala:92— Inbound.toJson has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
validate_plugin.check_c3 (cyclomatic 19) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:826— validate_plugin.check_c3 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.
explorer.startCreateNode (cyclomatic 19) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1152— explorer.startCreateNode has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar.showModal::renderField (cyclomatic 19) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1841— sidebar.showModal::renderField 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.
sim-replay-fold.renderedStream (cyclomatic 19) reports/20261028_120721_replay-terminal-batch__delegate-nebflow-810dea92/sim-replay-fold.mjs:41— sim-replay-fold.renderedStream 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.
providersUi.showModal::renderField (cyclomatic 19) src/main/resources/web/js/sidebar/providersUi.js:456— providersUi.showModal::renderField 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.
markdown.renderBacklinks (cyclomatic 19) src/main/resources/web/js/viewers/markdown.js:394— markdown.renderBacklinks has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
localStore.warmMirror (cyclomatic 19) src/main/resources/web/js/localStore.js:577— localStore.warmMirror has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (run, a function literal at line 582, a function literal at line 605). 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.
workline.priorTurnBadgeSettled (cyclomatic 19) src/main/resources/web/js/workline.js:128— workline.priorTurnBadgeSettled 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.
persistence.sanitizeForCache (cyclomatic 19) src/main/resources/web/js/persistence.js:225— persistence.sanitizeForCache has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
explorer.updatePickupProgress (cyclomatic 19) src/main/resources/web/js/explorer.js:1028— explorer.updatePickupProgress has cyclomatic complexity 19 (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.
html.bindZoomBridge (cyclomatic 19) REDACTED:392— html.bindZoomBridge has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 395). 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.
askAttachments.mountAnswerAttachments (cyclomatic 19) src/main/resources/web/js/askAttachments.js:315— askAttachments.mountAnswerAttachments has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 416, 400, 407, …). 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.
injectedRows.buildInjectedRow (cyclomatic 19) src/main/resources/web/js/chat/injectedRows.js:239— injectedRows.buildInjectedRow has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
chat.appendThinkingDelta (cyclomatic 19) src/main/resources/web/js/chat.js:4060— chat.appendThinkingDelta has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
flowMapArchive.fetchRemoteChains (cyclomatic 19) src/main/resources/web/js/flowMapArchive.js:314— flowMapArchive.fetchRemoteChains 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.
flowMapTab.bindCamera (cyclomatic 19) src/main/resources/web/js/flowMapTab.js:417— flowMapTab.bindCamera has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 439, a function literal at line 424, endDrag, …). 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.
canvas.reconcileFromServer (cyclomatic 19) src/main/resources/web/js/canvas.js:4717— canvas.reconcileFromServer has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskList.foldedRowsOf (cyclomatic 19) src/main/resources/web/js/taskList.js:354— taskList.foldedRowsOf has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
orbSettingsUI.bindAppearanceEvents (cyclomatic 19) src/main/resources/web/js/orbSettingsUI.js:165— orbSettingsUI.bindAppearanceEvents has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (syncSlot, a function literal at line 211, commit, …). 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.
friendsApi.downloadAttachment (cyclomatic 19) src/main/resources/web/js/friendsApi.js:717— friendsApi.downloadAttachment 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.
messages.hydrateGroupSenderNames (cyclomatic 19) REDACTED:1082— messages.hydrateGroupSenderNames has cyclomatic complexity 19 (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.
messages.jumpToQuote (cyclomatic 19) REDACTED:3747— messages.jumpToQuote has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
secretsPanel.onKeydown (cyclomatic 19) src/main/resources/web/js/secretsPanel.js:827— secretsPanel.onKeydown has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bgAgents.bgRemoteRowHtml (cyclomatic 19) src/main/resources/web/js/main/bgAgents.js:288— bgAgents.bgRemoteRowHtml has cyclomatic complexity 19 (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.
tabAnchor (cyclomatic 19) src/main/resources/web/js/canvas.js:76— tabAnchor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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.
mediaEntryCard (cyclomatic 19) src/main/resources/web/js/chatSearch.js:1821— mediaEntryCard has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 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.
(anonymous) (cyclomatic 19) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:886— (anonymous) 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.
openLightbox (cyclomatic 19) src/main/resources/web/js/lightbox.js:155— openLightbox has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 11 function items inside it that branch (onerror, a function literal at line 226, fail, …). 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.
UpdateStage.stage (cyclomatic 18) src/main/scala/nebflow/cli/UpdateStage.scala:80— UpdateStage.stage 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.
DaemonPanelStore.writeValues (cyclomatic 18) src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:102— DaemonPanelStore.writeValues has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
DaemonPanelStore.validateValue (cyclomatic 18) src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:154— DaemonPanelStore.validateValue 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.
EphemeralAgentRunner.apply (cyclomatic 18) src/main/scala/nebflow/core/flow/EphemeralAgentRunner.scala:37— EphemeralAgentRunner.apply has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PopTool.requestedPaths (cyclomatic 18) src/main/scala/nebflow/core/tools/PopTool.scala:270— PopTool.requestedPaths has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ScheduleTool.createAction (cyclomatic 18) src/main/scala/nebflow/core/tools/ScheduleTool.scala:270— ScheduleTool.createAction has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TaskBoardTool.nodeDispatch (cyclomatic 18) src/main/scala/nebflow/core/tools/TaskBoardTool.scala:180— TaskBoardTool.nodeDispatch has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GatewayAuth.authenticate (cyclomatic 18) src/main/scala/nebflow/gateway/GatewayAuth.scala:123— GatewayAuth.authenticate has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WikiRoutes.routes (cyclomatic 18) src/main/scala/nebflow/gateway/WikiRoutes.scala:45— WikiRoutes.routes has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RelayWsListener.handleFrame (cyclomatic 18) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1778— RelayWsListener.handleFrame has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WeixinIlinkBridgePlugin.intake (cyclomatic 18) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:408— WeixinIlinkBridgePlugin.intake 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.
audit-shots.boot (cyclomatic 18) reports/20261027_220000_mobile-canvas-ux/audit-shots.mjs:16— audit-shots.boot has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 21, 39, 48). 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.
login.waitLoop (cyclomatic 18) src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/login.mjs:120— login.waitLoop has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
i18n.applyLocaleToHtml (cyclomatic 18) src/main/resources/web/js/i18n.js:62— i18n.applyLocaleToHtml 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, 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.
markdown.applyJumpAnchor (cyclomatic 18) src/main/resources/web/js/viewers/markdown.js:156— markdown.applyJumpAnchor has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
persistence.restoreFromBackendHistory (cyclomatic 18) src/main/resources/web/js/persistence.js:1473— persistence.restoreFromBackendHistory has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
attachments.addFileAttachment (cyclomatic 18) src/main/resources/web/js/input/attachments.js:60— attachments.addFileAttachment has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
reference.buildFileLangRefCard (cyclomatic 18) src/main/resources/web/js/reference.js:636— reference.buildFileLangRefCard has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
flowViewers.openNodeResultViewer (cyclomatic 18) src/main/resources/web/js/flowViewers.js:84— flowViewers.openNodeResultViewer 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, 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.
flowMapTab.applyMeasuredLayout (cyclomatic 18) src/main/resources/web/js/flowMapTab.js:1818— flowMapTab.applyMeasuredLayout 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, 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.
flowMapTab.bindFlowMapClicks (cyclomatic 18) src/main/resources/web/js/flowMapTab.js:2019— flowMapTab.bindFlowMapClicks has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2036, 2020, 2022). 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.
flowMapTab.handleNodeWsEvent (cyclomatic 18) src/main/resources/web/js/flowMapTab.js:2316— flowMapTab.handleNodeWsEvent has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
taskList.chainDepthsOf (cyclomatic 18) src/main/resources/web/js/taskList.js:235— taskList.chainDepthsOf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
attachPreviewField.readInDialect (cyclomatic 18) src/main/resources/web/js/attachPreviewField.js:169— attachPreviewField.readInDialect 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.
attachUpload.uploadCardEl (cyclomatic 18) src/main/resources/web/js/attachUpload.js:205— attachUpload.uploadCardEl 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.
messages.loadOlderMessages (cyclomatic 18) REDACTED:3189— messages.loadOlderMessages 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.
contacts.doRefresh (cyclomatic 18) src/main/resources/web/js/contacts.js:161— contacts.doRefresh 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.
daemonPanel.buildField (cyclomatic 18) src/main/resources/web/js/daemonPanel.js:149— daemonPanel.buildField 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.
perception.showReceipt (cyclomatic 18) src/main/resources/web/js/perception.js:710— perception.showReceipt 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.
usageDashboard.loadHeatmap (cyclomatic 18) src/main/resources/web/js/usageDashboard.js:501— usageDashboard.loadHeatmap 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.
main.armQueueReconcileNet (cyclomatic 18) src/main/resources/web/js/main.js:691— main.armQueueReconcileNet has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
main.bgTaskOrigin (cyclomatic 18) src/main/resources/web/js/main.js:3067— main.bgTaskOrigin 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.
start (cyclomatic 18) src/main/resources/web/js/micOrb.js:1016— start has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1024, (anonymous)::loop, a function literal at line 1027, …). 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.
hydrateMedia (cyclomatic 18) src/main/resources/web/js/popArtifacts.js:178— hydrateMedia 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 12 function items inside it that branch (a function literal at line 220, fail, startTicketLeg, …). 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.
activateFloats (cyclomatic 18) src/main/resources/web/js/mobile/floatController.js:174— activateFloats has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DelegateRevival.reviveImpl (cyclomatic 17) src/main/scala/nebflow/agent/DelegateRevival.scala:116— DelegateRevival.reviveImpl has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SubAgentStartupRecovery.recoverOne (cyclomatic 17) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:360— SubAgentStartupRecovery.recoverOne 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.
ProcessManager.stopVerified (cyclomatic 17) src/main/scala/nebflow/cli/ProcessManager.scala:294— ProcessManager.stopVerified 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.
Rollback.rollbackTo (cyclomatic 17) src/main/scala/nebflow/core/hotupdate/Rollback.scala:69— Rollback.rollbackTo has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TaskStuckWatcher.runRecoveryLegInner (cyclomatic 17) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:2076— TaskStuckWatcher.runRecoveryLegInner has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DelegateTool.spawnBackground (cyclomatic 17) src/main/scala/nebflow/core/tools/DelegateTool.scala:701— DelegateTool.spawnBackground has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SubTaskTool.call (cyclomatic 17) src/main/scala/nebflow/core/tools/SubTaskTool.scala:121— SubTaskTool.call has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TaskListHistory.readFor (cyclomatic 17) src/main/scala/nebflow/core/tools/TaskListHistory.scala:238— TaskListHistory.readFor 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.
TaskTool.dispatchSync (cyclomatic 17) src/main/scala/nebflow/core/tools/TaskTool.scala:77— TaskTool.dispatchSync has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WebFetchTool.tryHttp (cyclomatic 17) src/main/scala/nebflow/core/tools/WebFetchTool.scala:162— WebFetchTool.tryHttp 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.
WebSearchTool.raceFirstSuccess (cyclomatic 17) src/main/scala/nebflow/core/tools/WebSearchTool.scala:496— WebSearchTool.raceFirstSuccess has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChunkedSendLoop.loop (cyclomatic 17) src/main/scala/nebflow/dropbox/ChunkTransport.scala:177— ChunkedSendLoop.loop has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WsConfigHandlers.handleFinishOnboarding (cyclomatic 17) src/main/scala/nebflow/gateway/WsConfigHandlers.scala:785— WsConfigHandlers.handleFinishOnboarding has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NeblinkRelayTunnel.handleRelayRequestLive (cyclomatic 17) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:913— NeblinkRelayTunnel.handleRelayRequestLive has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PerceptionCore.processMails (cyclomatic 17) src/main/scala/nebflow/perception/PerceptionService.scala:247— PerceptionCore.processMails has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChromeRenderer.render (cyclomatic 17) src/main/scala/nebflow/social/outbound/RichRenderer.scala:185— ChromeRenderer.render 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.
20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") (cyclomatic 17) reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:1194— 20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") 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.
20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") (cyclomatic 17) reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:1204— 20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") 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.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") (cyclomatic 17) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:1384— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.document.addEventListener("keydown") 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.
fileSearch.domSearch (cyclomatic 17) REDACTED:237— fileSearch.domSearch has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
turnGroup.computeTurnStats (cyclomatic 17) src/main/resources/web/js/turnGroup.js:157— turnGroup.computeTurnStats 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.
html.handleRefPick (cyclomatic 17) REDACTED:341— html.handleRefPick has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
chat.renderAskUserHistory (cyclomatic 17) src/main/resources/web/js/chat.js:3275— chat.renderAskUserHistory has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
chat.renderAttachmentPreview (cyclomatic 17) src/main/resources/web/js/chat.js:3618— chat.renderAttachmentPreview has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
reference.jumpRef (cyclomatic 17) src/main/resources/web/js/reference.js:753— reference.jumpRef 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.
flowMapArchive.bindLayerEvents (cyclomatic 17) src/main/resources/web/js/flowMapArchive.js:1333— flowMapArchive.bindLayerEvents has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1355, 1371, 1344, …). 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.
delegateChainView.cardBadgesHtml (cyclomatic 17) src/main/resources/web/js/delegateChainView.js:55— delegateChainView.cardBadgesHtml has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, 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.
canvas.initCardHeadGestures::finish (cyclomatic 17) src/main/resources/web/js/canvas.js:3372— canvas.initCardHeadGestures::finish 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.
canvas.restoreFromData (cyclomatic 17) src/main/resources/web/js/canvas.js:4679— canvas.restoreFromData has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
neblink.neblinkSettingsHTML (cyclomatic 17) src/main/resources/web/js/neblink.js:423— neblink.neblinkSettingsHTML 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.
sendState.applyReceipt (cyclomatic 17) src/main/resources/web/js/sendState.js:173— sendState.applyReceipt has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sendState.anchorSendToRealId (cyclomatic 17) src/main/resources/web/js/sendState.js:288— sendState.anchorSendToRealId 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.
messages.makeLocalThumbFrame (cyclomatic 17) REDACTED:2449— messages.makeLocalThumbFrame has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
messages.bubbleEl (cyclomatic 17) REDACTED:2864— messages.bubbleEl has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
errorRecovery.lastUserMessageText (cyclomatic 17) src/main/resources/web/js/errorRecovery.js:152— errorRecovery.lastUserMessageText has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
chatSearch.renderCalendar (cyclomatic 17) src/main/resources/web/js/chatSearch.js:480— chatSearch.renderCalendar has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
colResizer.bindResizer (cyclomatic 17) src/main/resources/web/js/colResizer.js:159— colResizer.bindResizer has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 191, 160, 221). 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.
contacts.initContacts (cyclomatic 17) src/main/resources/web/js/contacts.js:1200— contacts.initContacts has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1283, a function literal at line 1234, dismissSearchCard, …). 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.
scheduled-task.renderList (cyclomatic 17) src/main/resources/web/js/scheduled-task.js:153— scheduled-task.renderList has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
usageDashboard.onGridKeydown (cyclomatic 17) src/main/resources/web/js/usageDashboard.js:392— usageDashboard.onGridKeydown has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
usageDashboard.renderTable (cyclomatic 17) src/main/resources/web/js/usageDashboard.js:1086— usageDashboard.renderTable 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.
socialPanel.seedPanelCache (cyclomatic 17) src/main/resources/web/js/socialPanel.js:334— socialPanel.seedPanelCache 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.
bgAgents.bgStoreChildHtml (cyclomatic 17) src/main/resources/web/js/main/bgAgents.js:629— bgAgents.bgStoreChildHtml has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
refreshFileTab (cyclomatic 17) src/main/resources/web/js/canvas.js:896— refreshFileTab has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 5 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.
ensureCardChannel::onmessage (cyclomatic 17) src/main/resources/web/js/canvas.js:4046— ensureCardChannel::onmessage 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.
normalizeSvgDataUri (cyclomatic 17) src/main/resources/web/js/chat.js:2111— normalizeSvgDataUri has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
renderFlowMapInto (cyclomatic 17) src/main/resources/web/js/flowMapTab.js:2111— renderFlowMapInto has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cardHint (cyclomatic 17) src/main/resources/web/js/socialPanel.js:735— cardHint has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
loadAfterPages (cyclomatic 17) src/main/resources/web/js/chatSearch.js:1143— loadAfterPages has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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.
initScrollFollow (cyclomatic 17) src/main/resources/web/js/utils.js:1136— initScrollFollow has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1143, 1179, 1174). 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.
openLocalStore (cyclomatic 17) src/main/resources/web/js/localStore.js:382— openLocalStore has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 398). 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.
LocalActorSystem.actorLoop (cyclomatic 16) src/main/scala/nebflow/actor/ActorSystem.scala:155— LocalActorSystem.actorLoop has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentFinishTurn.handleLlmCompleteBranch (cyclomatic 16) src/main/scala/nebflow/agent/AgentFinishTurn.scala:27— AgentFinishTurn.handleLlmCompleteBranch 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.
CliRouter.parseArgs (cyclomatic 16) src/main/scala/nebflow/cli/CliRouter.scala:214— CliRouter.parseArgs 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.
MemoryRecallDaemon.tickRun (cyclomatic 16) src/main/scala/nebflow/core/MemoryRecallDaemon.scala:210— MemoryRecallDaemon.tickRun 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.
FlowTreeActor.running (cyclomatic 16) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:327— FlowTreeActor.running has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
HealthCheck.afterBind (cyclomatic 16) src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:518— HealthCheck.afterBind has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ScheduledTaskService.triggerTask (cyclomatic 16) src/main/scala/nebflow/core/scheduler/ScheduledTaskActor.scala:70— ScheduledTaskService.triggerTask has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
GlobTool.call (cyclomatic 16) src/main/scala/nebflow/core/tools/GlobTool.scala:80— GlobTool.call 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.
NodeEditTool.createNode (cyclomatic 16) src/main/scala/nebflow/core/tools/NodeEditTool.scala:993— NodeEditTool.createNode has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RemoteExecutor.execute (cyclomatic 16) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:285— RemoteExecutor.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
StringMatcher.applyCurlyQuotes (cyclomatic 16) src/main/scala/nebflow/core/tools/StringMatcher.scala:223— StringMatcher.applyCurlyQuotes 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.
WikiService.probeRemoteSubVaults (cyclomatic 16) src/main/scala/nebflow/core/wiki/WikiService.scala:677— WikiService.probeRemoteSubVaults has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ImageGenRoutes.routes (cyclomatic 16) src/main/scala/nebflow/gateway/ImageGenRoutes.scala:36— ImageGenRoutes.routes has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NeblinkRoutes.verifyPeerAccess (cyclomatic 16) src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1347— NeblinkRoutes.verifyPeerAccess has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WsFileOpsHandlers.handleDeletePath (cyclomatic 16) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:999— WsFileOpsHandlers.handleDeletePath has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTransferAction.handleList (cyclomatic 16) src/main/scala/nebflow/neblink/FileTransferAction.scala:142— FileTransferAction.handleList 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.
FriendService.doSend (cyclomatic 16) src/main/scala/nebflow/neblink/FriendService.scala:992— FriendService.doSend has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LogtoPasswordFlow.dance (cyclomatic 16) src/main/scala/nebflow/neblink/LogtoPasswordFlow.scala:319— LogtoPasswordFlow.dance 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.
PerceptionCore.sendDraft (cyclomatic 16) src/main/scala/nebflow/perception/PerceptionService.scala:755— PerceptionCore.sendDraft has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
20261028_canvas-ask-mode-mockup-v2.html.makeDock (cyclomatic 16) docs/design/20261028_canvas-ask-mode-mockup-v2.html:836— 20261028_canvas-ask-mode-mockup-v2.html.makeDock has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 907, 922, 914, …). 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.
utils.localizeToolSummary (cyclomatic 16) src/main/resources/web/js/utils.js:730— utils.localizeToolSummary 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. This is NOT this file's highest cyclomatic complexity: utils.initScrollFollow (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
localStore.importLegacyMessages (cyclomatic 16) src/main/resources/web/js/localStore.js:488— localStore.importLegacyMessages 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. This is NOT this file's highest cyclomatic complexity: localStore.openLocalStore (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
voiceEngine.onMicChunk (cyclomatic 16) src/main/resources/web/js/voiceEngine.js:239— voiceEngine.onMicChunk 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.
orbPresets.boardOf (cyclomatic 16) src/main/resources/web/js/orbPresets.js:141— orbPresets.boardOf 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.
explorer.importExternalDrop (cyclomatic 16) src/main/resources/web/js/explorer.js:493— explorer.importExternalDrop 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.
input.materializeOfflineBubbles (cyclomatic 16) src/main/resources/web/js/input.js:978— input.materializeOfflineBubbles has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
html.bindRefGlobalListeners (cyclomatic 16) REDACTED:290— html.bindRefGlobalListeners has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 293, 304, 308, …). 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.
LargeTextView.prefetch (cyclomatic 16) src/main/resources/web/js/viewers/largeText.js:484— LargeTextView.prefetch 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.
chat.readJsonString (cyclomatic 16) src/main/resources/web/js/chat.js:1424— chat.readJsonString 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. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
chat.window.addEventListener("message") (cyclomatic 16) src/main/resources/web/js/chat.js:2158— chat.window.addEventListener("message") has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
chat.renderAskAttachments (cyclomatic 16) src/main/resources/web/js/chat.js:2924— chat.renderAskAttachments has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 3001, a function literal at line 2926, makeStaticRow, …). 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. This is NOT this file's highest cyclomatic complexity: chat.appendToolStreamDelta (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
popArtifacts.popItemFromAttachment (cyclomatic 16) src/main/resources/web/js/popArtifacts.js:880— popArtifacts.popItemFromAttachment has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
popArtifacts.buildUserMediaRow (cyclomatic 16) src/main/resources/web/js/popArtifacts.js:908— popArtifacts.buildUserMediaRow has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
flowMapTab.renderFlowMapDiff (cyclomatic 16) src/main/resources/web/js/flowMapTab.js:1738— flowMapTab.renderFlowMapDiff 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.
wikiGraph.renderCrumbs (cyclomatic 16) src/main/resources/web/js/wikiGraph.js:419— wikiGraph.renderCrumbs has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
canvas.initCardWindowMode (cyclomatic 16) src/main/resources/web/js/canvas.js:4329— canvas.initCardWindowMode has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 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.
ws.attemptLanNearPathJump (cyclomatic 16) REDACTED:824— ws.attemptLanNearPathJump 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.
imagegenSection.saveImagegenKey (cyclomatic 16) src/main/resources/web/js/sidebar/imagegenSection.js:276— imagegenSection.saveImagegenKey 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.
friendGroups.groupErrToast (cyclomatic 16) src/main/resources/web/js/friendGroups.js:72— friendGroups.groupErrToast 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.
attachUpload.registerExternalTransfer (cyclomatic 16) src/main/resources/web/js/attachUpload.js:411— attachUpload.registerExternalTransfer has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
dropbox.bindChatEvents (cyclomatic 16) src/main/resources/web/js/dropbox.js:425— dropbox.bindChatEvents has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (syncSendState, sendText, a function literal at line 463, …). 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.
messages.syncConversation (cyclomatic 16) REDACTED:867— messages.syncConversation 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.
messages.startQuote (cyclomatic 16) REDACTED:3775— messages.startQuote has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
managePanel.syncManageControls (cyclomatic 16) src/main/resources/web/js/managePanel.js:161— managePanel.syncManageControls 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.
bgTaskOutputPopup.fetchRemoteFinal (cyclomatic 16) src/main/resources/web/js/bgTaskOutputPopup.js:598— bgTaskOutputPopup.fetchRemoteFinal 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.
sidebar.showFolderCtxMenu (cyclomatic 16) REDACTED:3246— sidebar.showFolderCtxMenu has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 3282, 3342, 3274, …). 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.
usageDashboard.buildShell (cyclomatic 16) src/main/resources/web/js/usageDashboard.js:157— usageDashboard.buildShell has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 206, 232, 312, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
plugins.renderPluginCard (cyclomatic 16) src/main/resources/web/js/plugins.js:391— plugins.renderPluginCard 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.
freeze.applyLocalFreeze (cyclomatic 16) src/main/resources/web/js/main/freeze.js:69— freeze.applyLocalFreeze has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
mergeQueueStatus.parseEntry (cyclomatic 16) src/main/resources/web/js/mergeQueueStatus.js:46— mergeQueueStatus.parseEntry has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
startDictation::onresult (cyclomatic 16) src/main/resources/web/js/voiceEngine.js:566— startDictation::onresult 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.
jumpToAsk (cyclomatic 16) src/main/resources/web/js/askPending.js:322— jumpToAsk has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (locate, settle, a function literal at line 340, …). 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.
TodoComment src/main/scala/nebflow/core/task/TaskStore.scala:490— // todo-panel §2.3: human todos are reminders FOR the user — the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
NodeEditTool.editNode (cognitive 2734) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1803— NodeEditTool.editNode has cognitive complexity 2734 (threshold 15). Drivers by points: if/else 154 (1319 pts), match/switch 48 (715 pts), loops 31 (657 pts), boolean chains 43 (nesting depth added 2458). 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.
WebSocketRoutes.handleMessage (cognitive 1860) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1262— WebSocketRoutes.handleMessage has cognitive complexity 1860 (threshold 15). Drivers by points: if/else 242 (802 pts), loops 73 (525 pts), match/switch 82 (486 pts), boolean chains 30, error handling 2 (17 pts) (nesting depth added 1431). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeEditTool.proceed (cognitive 940) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1125— NodeEditTool.proceed has cognitive complexity 940 (threshold 15). Drivers by points: if/else 69 (516 pts), match/switch 14 (241 pts), loops 18 (171 pts), boolean chains 12 (nesting depth added 827). 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.
RestApiRoutes.routes (cognitive 779) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:71— RestApiRoutes.routes has cognitive complexity 779 (threshold 15). Drivers by points: match/switch 107 (351 pts), loops 46 (259 pts), if/else 83 (158 pts), boolean chains 11 (nesting depth added 532). 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.
AgentProcessing.processing (cognitive 698) src/main/scala/nebflow/agent/AgentProcessing.scala:39— AgentProcessing.processing has cognitive complexity 698 (threshold 15). Drivers by points: loops 72 (447 pts), if/else 68 (136 pts), match/switch 30 (106 pts), boolean chains 9 (nesting depth added 519). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PresenceRoutes.routes (cognitive 691) src/main/scala/nebflow/gateway/PresenceRoutes.scala:205— PresenceRoutes.routes has cognitive complexity 691 (threshold 15). Drivers by points: match/switch 89 (285 pts), if/else 123 (225 pts), loops 37 (166 pts), boolean chains 13, error handling 1 (2 pts) (nesting depth added 428). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginRegistry.loadPlugin (cognitive 681) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:585— PluginRegistry.loadPlugin has cognitive complexity 681 (threshold 15). Drivers by points: match/switch 13 (225 pts), loops 20 (210 pts), if/else 32 (204 pts), error handling 2 (35 pts), boolean chains 7 (nesting depth added 607). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentSessionExecution.pipeLlmCall (cognitive 643) src/main/scala/nebflow/agent/AgentSessionExecution.scala:538— AgentSessionExecution.pipeLlmCall has cognitive complexity 643 (threshold 15). Drivers by points: if/else 66 (408 pts), loops 20 (148 pts), match/switch 10 (63 pts), boolean chains 24 (nesting depth added 523). 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.
AgentIdle.idle (cognitive 557) src/main/scala/nebflow/agent/AgentIdle.scala:85— AgentIdle.idle has cognitive complexity 557 (threshold 15). Drivers by points: loops 68 (383 pts), if/else 58 (126 pts), match/switch 12 (41 pts), boolean chains 7 (nesting depth added 412). 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.
ExternalSessionRunner.settle (cognitive 555) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:491— ExternalSessionRunner.settle has cognitive complexity 555 (threshold 15). Drivers by points: match/switch 18 (226 pts), loops 18 (189 pts), if/else 29 (136 pts), boolean chains 4 (nesting depth added 486). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowDagExecutor.execute (cognitive 539) src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:139— FlowDagExecutor.execute has cognitive complexity 539 (threshold 15). Drivers by points: loops 53 (276 pts), if/else 60 (144 pts), match/switch 39 (115 pts), boolean chains 4 (nesting depth added 383). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RestApiRoutes.presenceWsRoutes (cognitive 399) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586— RestApiRoutes.presenceWsRoutes has cognitive complexity 399 (threshold 15). Drivers by points: loops 39 (148 pts), match/switch 38 (136 pts), if/else 65 (108 pts), boolean chains 7 (nesting depth added 250). 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.
NeblinkRoutes.routes (cognitive 372) src/main/scala/nebflow/gateway/NeblinkRoutes.scala:56— NeblinkRoutes.routes has cognitive complexity 372 (threshold 15). Drivers by points: match/switch 50 (169 pts), loops 23 (114 pts), if/else 34 (80 pts), boolean chains 9 (nesting depth added 256). 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.
WebSocketRoutes.routes (cognitive 367) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1035— WebSocketRoutes.routes has cognitive complexity 367 (threshold 15). Drivers by points: loops 19 (247 pts), if/else 31 (71 pts), match/switch 9 (41 pts), boolean chains 8 (nesting depth added 300). 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.
BackoffSupervisor.active (cognitive 357) src/main/scala/nebflow/agent/BackoffSupervisor.scala:133— BackoffSupervisor.active has cognitive complexity 357 (threshold 15). Drivers by points: loops 18 (171 pts), if/else 58 (154 pts), match/switch 17 (31 pts), boolean chains 1 (nesting depth added 263). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
GatewayMain.runGateway (cognitive 334) src/main/scala/nebflow/gateway/GatewayMain.scala:382— GatewayMain.runGateway has cognitive complexity 334 (threshold 15). Drivers by points: loops 23 (219 pts), if/else 31 (65 pts), match/switch 16 (34 pts), error handling 8 (12 pts), boolean chains 4 (nesting depth added 252). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentFinishTurn.finishTurnCont (cognitive 327) src/main/scala/nebflow/agent/AgentFinishTurn.scala:205— AgentFinishTurn.finishTurnCont has cognitive complexity 327 (threshold 15). Drivers by points: loops 34 (197 pts), if/else 38 (94 pts), match/switch 7 (33 pts), boolean chains 3 (nesting depth added 245). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PortalWireCodec.decodeBody (cognitive 239) src/main/scala/nebflow/neblink/PortalWireCodec.scala:214— PortalWireCodec.decodeBody has cognitive complexity 239 (threshold 15). Drivers by points: loops 60 (228 pts), match/switch 2 (8 pts), if/else 2, boolean chains 1 (nesting depth added 174). 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.
LlmInterface.createLlm (cognitive 232) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:358— LlmInterface.createLlm has cognitive complexity 232 (threshold 15). Drivers by points: loops 27 (118 pts), if/else 41 (78 pts), match/switch 10 (23 pts), boolean chains 13 (nesting depth added 141). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.restoreTeams (cognitive 222) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:576— FlowTreeActor.restoreTeams has cognitive complexity 222 (threshold 15). Drivers by points: loops 22 (181 pts), if/else 9 (35 pts), match/switch 2 (6 pts) (nesting depth added 189). 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.
AgentFrozen.frozen (cognitive 217) src/main/scala/nebflow/agent/AgentFrozen.scala:145— AgentFrozen.frozen has cognitive complexity 217 (threshold 15). Drivers by points: loops 33 (164 pts), if/else 20 (38 pts), match/switch 5 (14 pts), boolean chains 1 (nesting depth added 158). 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.
buildHistoryRow (cognitive 214) src/main/resources/web/js/persistence.js:1017— buildHistoryRow has cognitive complexity 214 (threshold 15). Drivers by points: if/else 53 (114 pts), ternaries 15 (51 pts), boolean chains 41, error handling 2 (8 pts) (nesting depth added 103). 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.
FlowDagExecutor.executeAgent (cognitive 209) src/main/scala/nebflow/core/entity/FlowDagExecutor.scala:1127— FlowDagExecutor.executeAgent has cognitive complexity 209 (threshold 15). Drivers by points: loops 15 (120 pts), match/switch 6 (66 pts), if/else 6 (22 pts), boolean chains 1 (nesting depth added 181). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DelegateTerminal.onCompleted (cognitive 201) src/main/scala/nebflow/core/delegate/DelegateTerminal.scala:86— DelegateTerminal.onCompleted has cognitive complexity 201 (threshold 15). Drivers by points: if/else 30 (105 pts), loops 10 (55 pts), match/switch 6 (31 pts), boolean chains 10 (nesting depth added 145). 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.
showOptions (cognitive 201) src/main/resources/web/js/chat.js:2248— showOptions has cognitive complexity 201 (threshold 15). Drivers by points: if/else 78 (117 pts), ternaries 25 (51 pts), boolean chains 31, error handling 1 (2 pts) (nesting depth added 66). Most of this is not in the body itself: 6 of the 201 points are its own statements and the rest belongs to 49 function items inside it that branch (a function literal at line 2336, a function literal at line 2483, onclick, …). 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.
WebSocketRoutes.routes (cognitive 191) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:756— WebSocketRoutes.routes has cognitive complexity 191 (threshold 15). Drivers by points: loops 13 (117 pts), if/else 33 (60 pts), boolean chains 8, match/switch 2 (6 pts) (nesting depth added 135). 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.
PluginRegistry.validateServerEntry (cognitive 189) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:977— PluginRegistry.validateServerEntry has cognitive complexity 189 (threshold 15). Drivers by points: loops 12 (70 pts), match/switch 9 (69 pts), if/else 16 (49 pts), boolean chains 1 (nesting depth added 151). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketRoutes.handleMessage (cognitive 178) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1876— WebSocketRoutes.handleMessage has cognitive complexity 178 (threshold 15). Drivers by points: if/else 29 (112 pts), loops 5 (24 pts), match/switch 3 (20 pts), error handling 2 (17 pts), boolean chains 5 (nesting depth added 134). 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.
restoreFromStorage (cognitive 176) src/main/resources/web/js/persistence.js:618— restoreFromStorage has cognitive complexity 176 (threshold 15). Drivers by points: if/else 52 (101 pts), ternaries 14 (42 pts), boolean chains 26, error handling 2 (7 pts) (nesting depth added 82). Most of this is not in the body itself: 3 of the 176 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 627, 999, 1000, …). 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.
SocialRoutes.routes (cognitive 173) src/main/scala/nebflow/gateway/SocialRoutes.scala:29— SocialRoutes.routes has cognitive complexity 173 (threshold 15). Drivers by points: match/switch 42 (98 pts), if/else 38 (72 pts), boolean chains 3 (nesting depth added 90). 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.
AgentSessionExecution.pipeToolExecutions (cognitive 167) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1201— AgentSessionExecution.pipeToolExecutions has cognitive complexity 167 (threshold 15). Drivers by points: loops 12 (67 pts), if/else 12 (45 pts), match/switch 6 (45 pts), error handling 1 (7 pts), boolean chains 3 (nesting depth added 133). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MailTool.deliverShortNameUnscoped (cognitive 167) src/main/scala/nebflow/core/tools/MailTool.scala:1938— MailTool.deliverShortNameUnscoped has cognitive complexity 167 (threshold 15). Drivers by points: loops 14 (83 pts), match/switch 11 (73 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 138). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NodeEditTool.call (cognitive 155) src/main/scala/nebflow/core/tools/NodeEditTool.scala:372— NodeEditTool.call has cognitive complexity 155 (threshold 15). Drivers by points: match/switch 21 (73 pts), if/else 45 (70 pts), boolean chains 12 (nesting depth added 77). 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.
TurnEndpoint.runTurn (cognitive 148) src/main/scala/nebflow/gateway/TurnEndpoint.scala:57— TurnEndpoint.runTurn has cognitive complexity 148 (threshold 15). Drivers by points: loops 13 (79 pts), if/else 11 (54 pts), match/switch 2 (15 pts) (nesting depth added 122). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
bindSettingsEvents (cognitive 146) REDACTED:1294— bindSettingsEvents has cognitive complexity 146 (threshold 15). Drivers by points: ternaries 35 (66 pts), if/else 41 (52 pts), boolean chains 22, error handling 4 (5 pts), other 1 (nesting depth added 43). Most of this is not in the body itself: 10 of the 146 points are its own statements and the rest belongs to 41 function items inside it that branch (a function literal at line 1437, a function literal at line 1475, a function literal at line 1386, …). 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.
TaskListStore.updateSync (cognitive 144) src/main/scala/nebflow/core/tools/TaskListTool.scala:611— TaskListStore.updateSync has cognitive complexity 144 (threshold 15). Drivers by points: if/else 19 (79 pts), loops 7 (49 pts), match/switch 3 (15 pts), boolean chains 1 (nesting depth added 114). 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.
paper-download.main (cognitive 144) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:200— paper-download.main has cognitive complexity 144 (threshold 15). Drivers by points: if/else 34 (104 pts), boolean chains 16, error handling 4 (15 pts), ternaries 2 (8 pts), loops 1 (nesting depth added 87). Of this number, 137 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LlmInterface.createLlm (cognitive 133) src/main/scala/nebflow/llm/interface.scala:392— LlmInterface.createLlm has cognitive complexity 133 (threshold 15). Drivers by points: loops 15 (56 pts), if/else 30 (52 pts), match/switch 9 (20 pts), boolean chains 5 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MailTool.activateAgent (cognitive 131) src/main/scala/nebflow/core/tools/MailTool.scala:2161— MailTool.activateAgent has cognitive complexity 131 (threshold 15). Drivers by points: loops 16 (106 pts), match/switch 2 (14 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 109). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
input.send (cognitive 129) src/main/resources/web/js/input.js:192— input.send has cognitive complexity 129 (threshold 15). Drivers by points: if/else 43 (69 pts), boolean chains 36, ternaries 10 (17 pts), error handling 3 (7 pts) (nesting depth added 37). Of this number, 105 points are the body's own statements and 24 belong to 8 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.
deckFrame (cognitive 126) src/main/resources/web/js/canvas.js:2536— deckFrame has cognitive complexity 126 (threshold 15). Drivers by points: if/else 41 (76 pts), ternaries 15 (34 pts), boolean chains 15, loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelegateRevival.reviveImpl (cognitive 119) src/main/scala/nebflow/agent/DelegateRevival.scala:116— DelegateRevival.reviveImpl has cognitive complexity 119 (threshold 15). Drivers by points: loops 13 (104 pts), if/else 2 (14 pts), match/switch 1 (nesting depth added 103). 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.
DoctorRun.run (cognitive 117) src/main/scala/nebflow/cli/SystemCommands.scala:438— DoctorRun.run has cognitive complexity 117 (threshold 15). Drivers by points: if/else 57 (78 pts), error handling 8 (26 pts), match/switch 2 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DropboxService.uploadAndRelay (cognitive 116) src/main/scala/nebflow/dropbox/DropboxService.scala:991— DropboxService.uploadAndRelay has cognitive complexity 116 (threshold 15). Drivers by points: loops 11 (65 pts), match/switch 4 (26 pts), if/else 6 (25 pts) (nesting depth added 95). 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.
openWorkspaceItem (cognitive 114) src/main/resources/web/js/canvas.js:1274— openWorkspaceItem has cognitive complexity 114 (threshold 15). Drivers by points: if/else 40 (79 pts), boolean chains 28, ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 42). Of this number, 108 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentControlTool.doList (cognitive 113) src/main/scala/nebflow/core/tools/AgentControlTool.scala:491— AgentControlTool.doList has cognitive complexity 113 (threshold 15). Drivers by points: if/else 36 (91 pts), boolean chains 8, match/switch 3 (8 pts), loops 3 (6 pts) (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderTool (cognitive 111) src/main/resources/web/js/chat.js:932— renderTool has cognitive complexity 111 (threshold 15). Drivers by points: if/else 30 (45 pts), ternaries 23 (38 pts), boolean chains 15, error handling 4 (8 pts), loops 2 (5 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BashTool.doCall (cognitive 110) src/main/scala/nebflow/core/tools/BashTool.scala:460— BashTool.doCall has cognitive complexity 110 (threshold 15). Drivers by points: if/else 28 (63 pts), loops 4 (26 pts), match/switch 7 (19 pts), boolean chains 2 (nesting depth added 69). 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.
ContextRefresher.refreshTurn (cognitive 108) src/main/scala/nebflow/agent/ContextRefresher.scala:493— ContextRefresher.refreshTurn has cognitive complexity 108 (threshold 15). Drivers by points: loops 10 (55 pts), if/else 10 (47 pts), match/switch 2 (6 pts) (nesting depth added 86). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
connect::onmessage (cognitive 108) REDACTED:1167— connect::onmessage has cognitive complexity 108 (threshold 15). Drivers by points: if/else 23 (37 pts), error handling 9 (33 pts), loops 7 (23 pts), boolean chains 13, ternaries 1 (2 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelegateTool.spawnWithPlugins (cognitive 105) src/main/scala/nebflow/core/tools/DelegateTool.scala:848— DelegateTool.spawnWithPlugins has cognitive complexity 105 (threshold 15). Drivers by points: loops 10 (55 pts), if/else 18 (39 pts), match/switch 2 (11 pts) (nesting depth added 75). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
viewMarkdown (cognitive 103) src/main/resources/web/js/viewers/markdown.js:528— viewMarkdown has cognitive complexity 103 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 18, ternaries 9 (17 pts), error handling 6 (15 pts) (nesting depth added 41). Of this number, 21 points are the body's own statements and 82 belong to 12 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.
TaskStuckWatcher.recoverUngated (cognitive 101) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1093— TaskStuckWatcher.recoverUngated has cognitive complexity 101 (threshold 15). Drivers by points: if/else 40 (77 pts), match/switch 6 (17 pts), boolean chains 7 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
input.initInput (cognitive 99) src/main/resources/web/js/input.js:1567— input.initInput has cognitive complexity 99 (threshold 15). Drivers by points: if/else 46 (66 pts), boolean chains 20, loops 4 (8 pts), error handling 2, ternaries 2, match/switch 1 (nesting depth added 24). Most of this is not in the body itself: 14 of the 99 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 1695, a function literal at line 1940, a function literal at line 1876, …). 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.
flowMapArchive.renderDetail (cognitive 97) src/main/resources/web/js/flowMapArchive.js:929— flowMapArchive.renderDetail has cognitive complexity 97 (threshold 15). Drivers by points: ternaries 30 (48 pts), if/else 20 (27 pts), boolean chains 22 (nesting depth added 25). Of this number, 94 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.
(anonymous) (cognitive 95) src/main/resources/web/js/main.js:1289— (anonymous) has cognitive complexity 95 (threshold 15). Drivers by points: if/else 24 (49 pts), boolean chains 29, loops 3 (7 pts), ternaries 4 (7 pts), error handling 1 (2 pts), other 1 (nesting depth added 33). Of this number, 94 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 91) src/main/resources/web/js/main.js:4486— (anonymous) has cognitive complexity 91 (threshold 15). Drivers by points: boolean chains 46, if/else 11 (24 pts), ternaries 8 (16 pts), loops 4 (5 pts) (nesting depth added 22). Of this number, 88 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
draw (cognitive 90) src/main/resources/web/js/wikiGraph.js:1042— draw has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 18 (46 pts), if/else 17 (24 pts), boolean chains 18, loops 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChainWriteTool.registerChain (cognitive 89) src/main/scala/nebflow/core/tools/ChainWriteTool.scala:317— ChainWriteTool.registerChain has cognitive complexity 89 (threshold 15). Drivers by points: if/else 19 (47 pts), match/switch 8 (26 pts), loops 4 (16 pts) (nesting depth added 58). 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.
ShellSession.runProcess (cognitive 87) src/main/scala/nebflow/core/tools/shell.scala:632— ShellSession.runProcess has cognitive complexity 87 (threshold 15). Drivers by points: loops 10 (55 pts), if/else 14 (27 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 59). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
check_wiki_docs.check (cognitive 87) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:376— check_wiki_docs.check has cognitive complexity 87 (threshold 15). Drivers by points: if/else 21 (60 pts), loops 12 (22 pts), boolean chains 5 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initDropbox (cognitive 87) src/main/resources/web/js/dropbox.js:862— initDropbox has cognitive complexity 87 (threshold 15). Drivers by points: boolean chains 35, if/else 24 (31 pts), ternaries 10 (21 pts) (nesting depth added 18). None of this is in the body itself: all 87 points belong to 11 function literals inside it that branch (lines 968, 940, 876, …). 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.
AgentSessionExecution.executeToolInner (cognitive 86) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2032— AgentSessionExecution.executeToolInner has cognitive complexity 86 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 10 (36 pts), boolean chains 5 (nesting depth added 52). 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.
FriendMessageTool.call (cognitive 86) src/main/scala/nebflow/core/tools/FriendMessageTool.scala:611— FriendMessageTool.call has cognitive complexity 86 (threshold 15). Drivers by points: match/switch 13 (61 pts), if/else 6 (13 pts), loops 2 (11 pts), boolean chains 1 (nesting depth added 64). 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.
DaemonPanelSchema.indexDocument (cognitive 85) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:249— DaemonPanelSchema.indexDocument has cognitive complexity 85 (threshold 15). Drivers by points: if/else 30 (71 pts), match/switch 1 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 49). 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.
DropboxService.receiveChunkFromPeer (cognitive 85) src/main/scala/nebflow/dropbox/DropboxService.scala:1206— DropboxService.receiveChunkFromPeer has cognitive complexity 85 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 4 (21 pts), match/switch 3 (19 pts) (nesting depth added 69). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.frame (cognitive 84) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:1014— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.frame has cognitive complexity 84 (threshold 15). Drivers by points: if/else 33 (64 pts), boolean chains 10, ternaries 5 (9 pts), loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubAgentStartupRecovery.sweep (cognitive 83) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:135— SubAgentStartupRecovery.sweep has cognitive complexity 83 (threshold 15). Drivers by points: loops 7 (42 pts), if/else 13 (28 pts), match/switch 4 (13 pts) (nesting depth added 59). 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.
EphemeralAgentRunner.apply (cognitive 83) src/main/scala/nebflow/core/flow/EphemeralAgentRunner.scala:37— EphemeralAgentRunner.apply has cognitive complexity 83 (threshold 15). Drivers by points: loops 11 (66 pts), match/switch 3 (17 pts) (nesting depth added 69). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
openProjectsCreateDialog (cognitive 83) src/main/resources/web/js/projectTab.js:235— openProjectsCreateDialog has cognitive complexity 83 (threshold 15). Drivers by points: if/else 37 (41 pts), ternaries 17 (25 pts), boolean chains 14, error handling 2, loops 1 (nesting depth added 12). None of this is in the body itself: all 83 points belong to 37 function items inside it that branch (a function literal at line 453, renderDeviceUI, showErrorResult, …). 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.
RestApiRoutes.handleAuthCallback (cognitive 81) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4375— RestApiRoutes.handleAuthCallback has cognitive complexity 81 (threshold 15). Drivers by points: match/switch 8 (44 pts), loops 5 (28 pts), if/else 3 (9 pts) (nesting depth added 65). 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.
FileChangeTracker.checkChanges (cognitive 81) src/main/scala/nebflow/core/filewatch.scala:42— FileChangeTracker.checkChanges has cognitive complexity 81 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 8 (35 pts), boolean chains 1 (nesting depth added 63). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AuthRoutes.handleAuthCallback (cognitive 81) src/main/scala/nebflow/gateway/AuthRoutes.scala:275— AuthRoutes.handleAuthCallback has cognitive complexity 81 (threshold 15). Drivers by points: match/switch 8 (44 pts), loops 5 (28 pts), if/else 3 (9 pts) (nesting depth added 65). 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.
DelegateTerminal.classifyDrift (cognitive 80) src/main/scala/nebflow/core/delegate/DelegateTerminal.scala:458— DelegateTerminal.classifyDrift has cognitive complexity 80 (threshold 15). Drivers by points: if/else 12 (44 pts), match/switch 7 (33 pts), boolean chains 3 (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.
PerceptionCore.connectAccount (cognitive 80) src/main/scala/nebflow/perception/PerceptionService.scala:509— PerceptionCore.connectAccount has cognitive complexity 80 (threshold 15). Drivers by points: loops 9 (63 pts), match/switch 3 (10 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 62). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentSessionSync.parsePayload (cognitive 79) src/main/scala/nebflow/neblink/AgentSessionSync.scala:140— AgentSessionSync.parsePayload has cognitive complexity 79 (threshold 15). Drivers by points: loops 11 (77 pts), if/else 2 (nesting depth added 66). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
check_wiki_docs.main (cognitive 79) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:610— check_wiki_docs.main has cognitive complexity 79 (threshold 15). Drivers by points: if/else 19 (38 pts), loops 13 (36 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fmNodeCard.nodeHtml (cognitive 79) src/main/resources/web/js/fmNodeCard.js:260— fmNodeCard.nodeHtml has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 31 (52 pts), boolean chains 26, if/else 1 (nesting depth added 21). Of this number, 77 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.
replayHistoryPageInitialLoad (cognitive 79) src/main/resources/web/js/chat/historyReplay.js:44— replayHistoryPageInitialLoad has cognitive complexity 79 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 29, ternaries 6 (19 pts) (nesting depth added 26). Of this number, 70 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DropboxService.handleFileComplete (cognitive 78) src/main/scala/nebflow/dropbox/DropboxService.scala:1569— DropboxService.handleFileComplete has cognitive complexity 78 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 8 (36 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 55). 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.
popMediaIndex.indexMedia (cognitive 77) src/main/resources/web/js/popMediaIndex.js:61— popMediaIndex.indexMedia has cognitive complexity 77 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 27, ternaries 9 (22 pts) (nesting depth added 26). Most of this is not in the body itself: 3 of the 77 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 68, a function literal at line 103, a function literal at line 76, …). 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.
bindDeckInput (cognitive 77) src/main/resources/web/js/canvas.js:3002— bindDeckInput has cognitive complexity 77 (threshold 15). Drivers by points: if/else 42 (50 pts), boolean chains 19, ternaries 6 (8 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 77 points is its own statement and the rest belongs to 14 function items inside it that branch (a function literal at line 3011, a function literal at line 3054, endPanelDrag, …). 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.
foldView (cognitive 77) src/main/resources/web/js/flowMapTab.js:1229— foldView has cognitive complexity 77 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 9 (17 pts), ternaries 8 (17 pts), boolean chains 14 (nesting depth added 32). Of this number, 69 points are the body's own statements and 8 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
delegateFlowMap.buildDelegateFm (cognitive 76) src/main/resources/web/js/delegateFlowMap.js:72— delegateFlowMap.buildDelegateFm has cognitive complexity 76 (threshold 15). Drivers by points: boolean chains 49, ternaries 13 (18 pts), if/else 4 (7 pts), loops 2 (nesting depth added 8). Of this number, 73 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NeblinkRelayTunnel.handleAuthRejection (cognitive 75) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:626— NeblinkRelayTunnel.handleAuthRejection has cognitive complexity 75 (threshold 15). Drivers by points: loops 11 (47 pts), if/else 12 (28 pts) (nesting depth added 52). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WeixinIlinkBridgePlugin.start (cognitive 75) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:323— WeixinIlinkBridgePlugin.start has cognitive complexity 75 (threshold 15). Drivers by points: loops 9 (54 pts), if/else 5 (15 pts), match/switch 1 (6 pts) (nesting depth added 60). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
chatSearch.runSearch (cognitive 75) src/main/resources/web/js/chatSearch.js:1194— chatSearch.runSearch has cognitive complexity 75 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 22, loops 4 (8 pts), error handling 1, ternaries 1 (nesting depth added 28). Of this number, 68 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onFriendEvent (cognitive 75) REDACTED:4759— onFriendEvent has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (60 pts), boolean chains 7, ternaries 2 (5 pts), error handling 1 (3 pts) (nesting depth added 38). 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.
ProjectsRoutes.routes (cognitive 74) src/main/scala/nebflow/gateway/ProjectsRoutes.scala:24— ProjectsRoutes.routes has cognitive complexity 74 (threshold 15). Drivers by points: match/switch 15 (39 pts), loops 4 (18 pts), if/else 6 (15 pts), boolean chains 2 (nesting depth added 47). 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.
bgTaskRowHtml (cognitive 74) src/main/resources/web/js/main/bgAgents.js:464— bgTaskRowHtml has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 31 (37 pts), boolean chains 21, if/else 8 (15 pts), other 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachInlineImage (cognitive 73) REDACTED:2162— attachInlineImage has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 20, ternaries 6 (11 pts), error handling 5 (10 pts) (nesting depth added 17). Of this number, 41 points are the body's own statements and 32 belong to 14 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.
friendGroups.buildGroupSettings (cognitive 71) src/main/resources/web/js/friendGroups.js:518— friendGroups.buildGroupSettings has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 13, ternaries 7 (13 pts), error handling 6 (12 pts), loops 2 (3 pts) (nesting depth added 22). Most of this is not in the body itself: 6 of the 71 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 701, a function literal at line 602, a function literal at line 753, …). 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.
renderStructureBody (cognitive 71) src/main/resources/web/js/delegateChainView.js:320— renderStructureBody has cognitive complexity 71 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 22, ternaries 7 (16 pts), loops 5 (8 pts) (nesting depth added 24). Of this number, 56 points are the body's own statements and 15 belong to 10 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.
AgentControlTool.doRestart (cognitive 70) src/main/scala/nebflow/core/tools/AgentControlTool.scala:1020— AgentControlTool.doRestart has cognitive complexity 70 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 7 (30 pts), match/switch 3 (7 pts) (nesting depth added 45). 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.
WsFileOpsHandlers.handleTextWindow (cognitive 70) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:691— WsFileOpsHandlers.handleTextWindow has cognitive complexity 70 (threshold 15). Drivers by points: loops 10 (65 pts), boolean chains 3, if/else 2 (nesting depth added 55). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTransferAction.chunkedPut (cognitive 70) src/main/scala/nebflow/neblink/FileTransferAction.scala:332— FileTransferAction.chunkedPut has cognitive complexity 70 (threshold 15). Drivers by points: if/else 26 (65 pts), boolean chains 5 (nesting depth added 39). 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.
input.dispatchQueuedItemNow (cognitive 70) src/main/resources/web/js/input.js:1352— input.dispatchQueuedItemNow has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (34 pts), ternaries 7 (19 pts), boolean chains 15, error handling 1 (2 pts) (nesting depth added 23). Of this number, 56 points are the body's own statements and 14 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.
renderChatModal (cognitive 70) REDACTED:1112— renderChatModal has cognitive complexity 70 (threshold 15). Drivers by points: if/else 38 (55 pts), boolean chains 13, other 1, ternaries 1 (nesting depth added 17). Of this number, 22 points are the body's own statements and 48 belong to 27 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.
HealthShow.run (cognitive 68) src/main/scala/nebflow/cli/HealthCommand.scala:94— HealthShow.run has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (55 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PerceptionCore.processMails (cognitive 68) src/main/scala/nebflow/perception/PerceptionService.scala:247— PerceptionCore.processMails has cognitive complexity 68 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 7 (13 pts), match/switch 2 (10 pts) (nesting depth added 50). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSearchTool.raceFirstSuccess (cognitive 67) src/main/scala/nebflow/core/tools/WebSearchTool.scala:496— WebSearchTool.raceFirstSuccess has cognitive complexity 67 (threshold 15). Drivers by points: loops 8 (44 pts), match/switch 3 (21 pts), if/else 2 (nesting depth added 54). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
validate_plugin.main (cognitive 67) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:1027— validate_plugin.main has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 17 (21 pts), if/else 16 (19 pts), boolean chains 16, loops 4 (6 pts), error handling 3 (5 pts) (nesting depth added 11). 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.
delegatePanoramaView.buildEdges (cognitive 67) src/main/resources/web/js/delegatePanoramaView.js:920— delegatePanoramaView.buildEdges has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (35 pts), ternaries 5 (17 pts), boolean chains 8, loops 5 (7 pts) (nesting depth added 33). Of this number, 38 points are the body's own statements and 29 belong 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.
FileOpenCache.parseMeta (cognitive 66) src/main/scala/nebflow/core/tools/FileOpenCache.scala:175— FileOpenCache.parseMeta has cognitive complexity 66 (threshold 15). Drivers by points: loops 11 (66 pts) (nesting depth added 55). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ConfigRoutes.routes (cognitive 64) src/main/scala/nebflow/gateway/ConfigRoutes.scala:24— ConfigRoutes.routes has cognitive complexity 64 (threshold 15). Drivers by points: match/switch 14 (35 pts), if/else 8 (15 pts), loops 5 (14 pts) (nesting depth added 37). 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.
chainFromStoreRecord (cognitive 64) src/main/resources/web/js/delegateChainStub.js:264— chainFromStoreRecord has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 29, ternaries 10 (20 pts), if/else 8 (14 pts), loops 1 (nesting depth added 16). Of this number, 61 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsFileOpsHandlers.handleDeletePath (cognitive 63) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:999— WsFileOpsHandlers.handleDeletePath has cognitive complexity 63 (threshold 15). Drivers by points: loops 9 (42 pts), if/else 5 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 47). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
bindCanvas (cognitive 63) src/main/resources/web/js/wikiGraph.js:1268— bindCanvas has cognitive complexity 63 (threshold 15). Drivers by points: if/else 34 (52 pts), boolean chains 8, ternaries 3 (nesting depth added 18). None of this is in the body itself: all 63 points belong to 5 function items inside it that branch (a function literal at line 1286, endDrag, a function literal at line 1370, …). 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.
AgentPingpong.recoverAtIdle (cognitive 62) src/main/scala/nebflow/agent/AgentPingpong.scala:685— AgentPingpong.recoverAtIdle has cognitive complexity 62 (threshold 15). Drivers by points: loops 10 (49 pts), if/else 5 (8 pts), match/switch 2 (5 pts) (nesting depth added 45). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
collectEdges (cognitive 62) src/main/resources/web/js/flowMapTab.js:778— collectEdges has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 10 (16 pts), boolean chains 9, other 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildChainHeaderRow (cognitive 62) src/main/resources/web/js/taskList.js:523— buildChainHeaderRow has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 22, ternaries 8 (14 pts), error handling 1 (3 pts) (nesting depth added 14). Of this number, 42 points are the body's own statements and 20 belong to 5 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.
attachStructureArchive (cognitive 62) src/main/resources/web/js/delegateChainView.js:664— attachStructureArchive has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 19, error handling 8 (14 pts), ternaries 4 (6 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 4 of the 62 points are its own statements and the rest belongs to 23 function items inside it that branch (loadRows, a function literal at line 803, a function literal at line 856, …). 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.
makeReference (cognitive 62) src/main/resources/web/js/reference.js:102— makeReference has cognitive complexity 62 (threshold 15). Drivers by points: boolean chains 44, ternaries 6 (11 pts), if/else 7 (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.
AgentStreamEvent.toJson (cognitive 61) src/main/scala/nebflow/actor/AgentEvent.scala:256— AgentStreamEvent.toJson has cognitive complexity 61 (threshold 15). Drivers by points: if/else 36 (53 pts), match/switch 4 (8 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteBgOutputLog.scan (cognitive 61) src/main/scala/nebflow/core/tools/RemoteBgOutputLog.scala:57— RemoteBgOutputLog.scan has cognitive complexity 61 (threshold 15). Drivers by points: if/else 27 (37 pts), boolean chains 16, loops 3 (4 pts), match/switch 2 (4 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.
ConsoleTakeover.onConnect (cognitive 61) src/main/scala/nebflow/gateway/ConsoleTakeover.scala:78— ConsoleTakeover.onConnect has cognitive complexity 61 (threshold 15). Drivers by points: loops 8 (49 pts), if/else 4 (8 pts), match/switch 1 (4 pts) (nesting depth added 48). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
messages.sendCurrent (cognitive 61) REDACTED:4185— messages.sendCurrent has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 18, ternaries 5 (9 pts), error handling 1 (nesting depth added 21). Of this number, 59 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.
DaemonPanelStore.writeValues (cognitive 60) src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:102— DaemonPanelStore.writeValues has cognitive complexity 60 (threshold 15). Drivers by points: match/switch 5 (21 pts), if/else 8 (20 pts), loops 4 (18 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowDagCompiler.validate (cognitive 60) src/main/scala/nebflow/core/entity/FlowDagCompiler.scala:69— FlowDagCompiler.validate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 33 (37 pts), match/switch 11 (14 pts), boolean chains 9 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
WsFileOpsHandlers.handleReadFile (cognitive 60) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:275— WsFileOpsHandlers.handleReadFile has cognitive complexity 60 (threshold 15). Drivers by points: loops 8 (34 pts), if/else 11 (20 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
OpenAiAdapter.processOpenAiData (cognitive 60) src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:522— OpenAiAdapter.processOpenAiData has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 6 (24 pts), boolean chains 5 (nesting depth added 36). 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.
wikiGraph.rebuildSim (cognitive 60) src/main/resources/web/js/wikiGraph.js:658— wikiGraph.rebuildSim has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 25, loops 8, ternaries 1 (nesting depth added 13). Of this number, 57 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.
viewPptx (cognitive 60) REDACTED:234— viewPptx has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 21, ternaries 6 (9 pts), error handling 4 (5 pts), loops 2 (nesting depth added 8). Of this number, 43 points are the body's own statements and 17 belong to 18 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SubAgentStartupRecovery.recoverOne (cognitive 59) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:360— SubAgentStartupRecovery.recoverOne has cognitive complexity 59 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 6 (21 pts), match/switch 3 (13 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chrome-session.main (cognitive 59) src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:77— chrome-session.main has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (28 pts), ternaries 7 (14 pts), boolean chains 7, loops 3 (7 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 27). 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.
renderBgAgentDropdown (cognitive 59) src/main/resources/web/js/main/bgAgents.js:683— renderBgAgentDropdown has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 13, loops 5 (7 pts), ternaries 4 (5 pts), error handling 2 (3 pts) (nesting depth added 13). Of this number, 28 points are the body's own statements and 31 belong to 12 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.
FlowTreeActor.handleUnmount (cognitive 58) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:516— FlowTreeActor.handleUnmount has cognitive complexity 58 (threshold 15). Drivers by points: loops 10 (55 pts), if/else 2 (3 pts) (nesting depth added 46). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SessionStore.mergeSessionFromCloud (cognitive 57) src/main/scala/nebflow/core/SessionStore.scala:1392— SessionStore.mergeSessionFromCloud has cognitive complexity 57 (threshold 15). Drivers by points: loops 8 (36 pts), if/else 6 (20 pts), boolean chains 1 (nesting depth added 42). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BlockingSubagent.run (cognitive 57) src/main/scala/nebflow/core/tools/BlockingSubagent.scala:70— BlockingSubagent.run has cognitive complexity 57 (threshold 15). Drivers by points: loops 8 (52 pts), if/else 3 (4 pts), match/switch 1 (nesting depth added 45). 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.
SubTaskTool.call (cognitive 57) src/main/scala/nebflow/core/tools/SubTaskTool.scala:121— SubTaskTool.call has cognitive complexity 57 (threshold 15). Drivers by points: match/switch 6 (27 pts), loops 3 (24 pts), if/else 6 (nesting depth added 42). 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.
validate_plugin.check_mcp_json (cognitive 57) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:400— validate_plugin.check_mcp_json has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 6, loops 2 (5 pts), error handling 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
input.hydrateQueueFromVault::run (cognitive 57) src/main/resources/web/js/input.js:762— input.hydrateQueueFromVault::run has cognitive complexity 57 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 7 (17 pts), ternaries 2 (7 pts), boolean chains 6, error handling 2 (6 pts) (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.
contacts.buildResultCard (cognitive 57) src/main/resources/web/js/contacts.js:843— contacts.buildResultCard has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 12, error handling 4 (8 pts), ternaries 1 (2 pts) (nesting depth added 20). Of this number, 19 points are the body's own statements and 38 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildCanvas (cognitive 57) src/main/resources/web/js/delegatePanoramaView.js:392— buildCanvas has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 7 (13 pts), boolean chains 11, loops 7 (9 pts) (nesting depth added 19). Of this number, 45 points are the body's own statements and 12 belong to 12 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.
AgentSessionExecution.maybeAutoCompact (cognitive 56) src/main/scala/nebflow/agent/AgentSessionExecution.scala:39— AgentSessionExecution.maybeAutoCompact has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (46 pts), boolean chains 6, match/switch 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsoleTakeover.handleRetake (cognitive 56) src/main/scala/nebflow/gateway/ConsoleTakeover.scala:133— ConsoleTakeover.handleRetake has cognitive complexity 56 (threshold 15). Drivers by points: loops 8 (47 pts), match/switch 2 (6 pts), if/else 3 (nesting depth added 43). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FriendService.dispatchPull (cognitive 56) src/main/scala/nebflow/neblink/FriendService.scala:640— FriendService.dispatchPull has cognitive complexity 56 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 7 (20 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 39). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LocalActorSystem.spawn (cognitive 55) src/main/scala/nebflow/actor/ActorSystem.scala:62— LocalActorSystem.spawn has cognitive complexity 55 (threshold 15). Drivers by points: loops 10 (55 pts) (nesting depth added 45). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExternalSessionRunner.spawn (cognitive 55) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:116— ExternalSessionRunner.spawn has cognitive complexity 55 (threshold 15). Drivers by points: loops 8 (52 pts), match/switch 2 (3 pts) (nesting depth added 45). 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.
PerceptionCore.bootInitialize (cognitive 55) src/main/scala/nebflow/perception/PerceptionService.scala:136— PerceptionCore.bootInitialize has cognitive complexity 55 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 4 (10 pts) (nesting depth added 42). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
messages.fetchDeviceMsgsServer (cognitive 55) REDACTED:6238— messages.fetchDeviceMsgsServer has cognitive complexity 55 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 14, loops 6 (14 pts), ternaries 3 (7 pts), error handling 1 (2 pts) (nesting depth added 22). Of this number, 50 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bgAgentPopup.openStepPopup (cognitive 55) src/main/resources/web/js/bgAgentPopup.js:402— bgAgentPopup.openStepPopup has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 14, loops 1 (nesting depth added 19). Of this number, 51 points are the body's own statements and 4 belong to 2 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.
AskLiveSources.make (cognitive 54) src/main/scala/nebflow/core/ask/AskGatewayServices.scala:124— AskLiveSources.make has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 7 (17 pts), error handling 4, boolean chains 3, match/switch 3 (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.
TaskListStore.createSync (cognitive 54) src/main/scala/nebflow/core/tools/TaskListTool.scala:532— TaskListStore.createSync has cognitive complexity 54 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 5 (20 pts), match/switch 1 (7 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiService.probeRemoteSubVaults (cognitive 54) src/main/scala/nebflow/core/wiki/WikiService.scala:677— WikiService.probeRemoteSubVaults has cognitive complexity 54 (threshold 15). Drivers by points: loops 7 (33 pts), match/switch 3 (12 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 41). 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.
input.sendImmediate (cognitive 54) src/main/resources/web/js/input.js:1127— input.sendImmediate has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 18, ternaries 6 (13 pts), error handling 1 (2 pts) (nesting depth added 12). Of this number, 43 points are the body's own statements and 11 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.
canvasGestures.bindGestures (cognitive 54) src/main/resources/web/js/mobile/canvasGestures.js:54— canvasGestures.bindGestures has cognitive complexity 54 (threshold 15). Drivers by points: if/else 26, boolean chains 16, ternaries 7 (11 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 54 points are its own statements and the rest belongs to 8 function items inside it that branch (onMove, onUp, onDown, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
consumeFrame (cognitive 53) src/main/resources/web/js/askDock.js:364— consumeFrame has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 16, ternaries 3 (6 pts), loops 1, match/switch 1 (nesting depth added 18). Of this number, 48 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStuckWatcher.runRecoveryLegInner (cognitive 52) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:2076— TaskStuckWatcher.runRecoveryLegInner has cognitive complexity 52 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 4 (19 pts), if/else 2 (6 pts) (nesting depth added 40). 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.
MailTool.queueToSession (cognitive 52) src/main/scala/nebflow/core/tools/MailTool.scala:1778— MailTool.queueToSession has cognitive complexity 52 (threshold 15). Drivers by points: loops 7 (35 pts), match/switch 2 (10 pts), if/else 2 (7 pts) (nesting depth added 41). 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.
AnthropicAdapter.processAnthropicEvent (cognitive 52) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:622— AnthropicAdapter.processAnthropicEvent has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 6 (22 pts) (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.
NeblinkEnrollment.persistCredential (cognitive 52) src/main/scala/nebflow/neblink/NeblinkEnrollment.scala:153— NeblinkEnrollment.persistCredential has cognitive complexity 52 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 2 (7 pts) (nesting depth added 41). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
initInput::onkeydown (cognitive 52) src/main/resources/web/js/input.js:1738— initInput::onkeydown has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (47 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openMailEditor (cognitive 52) src/main/resources/web/js/perception.js:751— openMailEditor has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (32 pts), boolean chains 14, ternaries 5 (6 pts) (nesting depth added 5). Most of this is not in the body itself: 14 of the 52 points are its own statements and the rest belongs to 26 function items inside it that branch (a function literal at line 977, a function literal at line 926, a function literal at line 872, …). 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.
delegateCard (cognitive 52) src/main/resources/web/js/delegatePanoramaView.js:672— delegateCard has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 19, ternaries 11 (19 pts), if/else 12 (13 pts), error handling 1 (nesting depth added 9). Of this number, 42 points are the body's own statements and 10 belong to 6 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.
ExternalSessionRunner.startResumeTurn (cognitive 51) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:288— ExternalSessionRunner.startResumeTurn has cognitive complexity 51 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 39). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MailTool.call (cognitive 51) src/main/scala/nebflow/core/tools/MailTool.scala:626— MailTool.call has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 6 (27 pts), if/else 10 (24 pts) (nesting depth added 35). 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.
NfFileRoutes.nfFileRoutes (cognitive 51) src/main/scala/nebflow/gateway/NfFileRoutes.scala:225— NfFileRoutes.nfFileRoutes has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 8 (38 pts), if/else 5 (12 pts), boolean chains 1 (nesting depth added 37). 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.
LogtoPasswordFlow.dance (cognitive 51) src/main/scala/nebflow/neblink/LogtoPasswordFlow.scala:319— LogtoPasswordFlow.dance has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 4 (28 pts), if/else 10 (22 pts), boolean chains 1 (nesting depth added 36). 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.
canvas.initCanvas (cognitive 51) src/main/resources/web/js/canvas.js:3831— canvas.initCanvas has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 9, ternaries 3 (5 pts) (nesting depth added 14). Most of this is not in the body itself: 11 of the 51 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 3852, 3876, 3900, …). 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.
bindSettingsEvents (cognitive 51) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1267— bindSettingsEvents has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (25 pts), ternaries 11 (18 pts), boolean chains 6, error handling 1, other 1 (nesting depth added 11). Most of this is not in the body itself: 3 of the 51 points are its own statements and the rest belongs to 29 function items inside it that branch (a function literal at line 1306, sendSttConfig, a function literal at line 1448, …). 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.
AgentSessionExecution.buildAllowedToolSet (cognitive 50) src/main/scala/nebflow/agent/AgentSessionExecution.scala:2271— AgentSessionExecution.buildAllowedToolSet has cognitive complexity 50 (threshold 15). Drivers by points: if/else 38 (40 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
SendConfirm.ask (cognitive 50) src/main/scala/nebflow/agent/SendConfirm.scala:121— SendConfirm.ask has cognitive complexity 50 (threshold 15). Drivers by points: loops 7 (42 pts), match/switch 2 (5 pts), if/else 2 (3 pts) (nesting depth added 39). 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.
GrepTool.runGrep (cognitive 50) src/main/scala/nebflow/core/tools/GrepTool.scala:153— GrepTool.runGrep has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (38 pts), match/switch 4 (7 pts), loops 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MailTool.resolveAndQueue (cognitive 50) src/main/scala/nebflow/core/tools/MailTool.scala:1609— MailTool.resolveAndQueue has cognitive complexity 50 (threshold 15). Drivers by points: loops 8 (28 pts), match/switch 5 (21 pts), if/else 1 (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ShellSession.executeBackground (cognitive 50) src/main/scala/nebflow/core/tools/shell.scala:214— ShellSession.executeBackground has cognitive complexity 50 (threshold 15). Drivers by points: loops 8 (36 pts), if/else 2 (8 pts), match/switch 1 (6 pts) (nesting depth added 39). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsFileOpsHandlers.handleTextSearch (cognitive 50) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:827— WsFileOpsHandlers.handleTextSearch has cognitive complexity 50 (threshold 15). Drivers by points: loops 8 (44 pts), if/else 4, boolean chains 2 (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RichFeishuAdapter.deliverLongShot (cognitive 50) src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:144— RichFeishuAdapter.deliverLongShot has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 3 (15 pts), match/switch 2 (3 pts) (nesting depth added 34). 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.
bgAgents.bgDelegateGroups (cognitive 50) src/main/resources/web/js/main/bgAgents.js:399— bgAgents.bgDelegateGroups has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 20, if/else 6 (13 pts), loops 8 (11 pts), ternaries 3 (6 pts) (nesting depth added 13). Of this number, 49 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.
(anonymous) (cognitive 50) src/main/resources/web/js/main.js:3540— (anonymous) has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 15, ternaries 6 (13 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.
ContextRefresher.buildTeamCatalogForSession (cognitive 49) src/main/scala/nebflow/agent/ContextRefresher.scala:606— ContextRefresher.buildTeamCatalogForSession has cognitive complexity 49 (threshold 15). Drivers by points: loops 7 (35 pts), if/else 2 (10 pts), match/switch 2 (4 pts) (nesting depth added 38). 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.
Rollback.rollbackTo (cognitive 49) src/main/scala/nebflow/core/hotupdate/Rollback.scala:69— Rollback.rollbackTo has cognitive complexity 49 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 5 (22 pts) (nesting depth added 38). 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.
LoopGuard.evaluate (cognitive 49) src/main/scala/nebflow/core/processor/LoopGuard.scala:169— LoopGuard.evaluate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (36 pts), match/switch 3 (7 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScheduleTool.createAction (cognitive 49) src/main/scala/nebflow/core/tools/ScheduleTool.scala:270— ScheduleTool.createAction has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 6 (26 pts), loops 4 (18 pts), if/else 4 (5 pts) (nesting depth added 35). 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.
deviceConvs (cognitive 49) REDACTED:5770— deviceConvs has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 6 (12 pts), boolean chains 9, loops 6 (8 pts) (nesting depth added 17). Of this number, 48 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.
MemoryRecallDaemon.tickRun (cognitive 48) src/main/scala/nebflow/core/MemoryRecallDaemon.scala:210— MemoryRecallDaemon.tickRun has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 3 (15 pts), loops 3 (6 pts) (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.
FriendService.uploadStreamChecked (cognitive 48) src/main/scala/nebflow/neblink/FriendService.scala:1339— FriendService.uploadStreamChecked has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 4 (18 pts), if/else 7 (16 pts), loops 4 (14 pts) (nesting depth added 33). 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.
MailClient.send (cognitive 48) src/main/scala/nebflow/perception/MailClient.scala:420— MailClient.send has cognitive complexity 48 (threshold 15). Drivers by points: loops 8 (29 pts), if/else 10 (13 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 25). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
sidebar.showModal::renderField (cognitive 48) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1841— sidebar.showModal::renderField has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 10 (40 pts), boolean chains 8 (nesting depth added 30). 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.
providersUi.showModal::renderField (cognitive 48) src/main/resources/web/js/sidebar/providersUi.js:456— providersUi.showModal::renderField has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 10 (40 pts), boolean chains 8 (nesting depth added 30). 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.
attachStripFold.syncAttachmentStrip (cognitive 48) src/main/resources/web/js/attachStripFold.js:28— attachStripFold.syncAttachmentStrip has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 13). Of this number, 45 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InteractionHub.complete (cognitive 47) src/main/scala/nebflow/agent/InteractionHub.scala:918— InteractionHub.complete has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (25 pts), loops 5 (15 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
NodeTools.buildNodeListPayload (cognitive 47) src/main/scala/nebflow/core/tools/NodeTools.scala:1658— NodeTools.buildNodeListPayload has cognitive complexity 47 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 4 (16 pts), match/switch 2 (10 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatAuth.parseJws (cognitive 47) src/main/scala/nebflow/gateway/PatAuth.scala:184— PatAuth.parseJws has cognitive complexity 47 (threshold 15). Drivers by points: loops 8 (44 pts), if/else 2, error handling 1 (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
validate_plugin.check_c11 (cognitive 47) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:554— validate_plugin.check_c11 has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 6 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 24). 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.
renderSettings (cognitive 47) REDACTED:842— renderSettings has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 21, ternaries 13, if/else 7 (8 pts), error handling 3 (5 pts) (nesting depth added 3). Of this number, 32 points are the body's own statements and 15 belong to 16 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.
RestApiRoutes.performLocalLogout (cognitive 46) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4330— RestApiRoutes.performLocalLogout has cognitive complexity 46 (threshold 15). Drivers by points: loops 9 (45 pts), match/switch 1 (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
UpdateRun.twoPhaseLocal (cognitive 46) src/main/scala/nebflow/cli/SystemCommands.scala:97— UpdateRun.twoPhaseLocal has cognitive complexity 46 (threshold 15). Drivers by points: match/switch 5 (17 pts), loops 3 (15 pts), if/else 6 (13 pts), boolean chains 1 (nesting depth added 31). 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.
AuthRoutes.performLocalLogout (cognitive 46) src/main/scala/nebflow/gateway/AuthRoutes.scala:224— AuthRoutes.performLocalLogout has cognitive complexity 46 (threshold 15). Drivers by points: loops 9 (45 pts), match/switch 1 (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
delegateChainStub.rowFromRegistry (cognitive 46) src/main/resources/web/js/delegateChainStub.js:201— delegateChainStub.rowFromRegistry has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 21, ternaries 13 (18 pts), if/else 7 (nesting depth added 5). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
resetChatForActiveSession (cognitive 46) REDACTED:2284— resetChatForActiveSession has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 8 (21 pts), boolean chains 4 (nesting depth added 19). Of this number, 41 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
makePreviewFrame (cognitive 46) src/main/resources/web/js/attachImagePreview.js:293— makePreviewFrame has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 12, if/else 8 (10 pts), error handling 3 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HealthCheck.atDoor (cognitive 45) src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:474— HealthCheck.atDoor has cognitive complexity 45 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 6 (15 pts), boolean chains 2 (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTaskStore.update (cognitive 45) src/main/scala/nebflow/core/task/TaskStore.scala:291— FileTaskStore.update has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 4 (11 pts), boolean chains 4 (nesting depth added 24). 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.
FriendMessageTool.copyLocal (cognitive 45) src/main/scala/nebflow/core/tools/FriendMessageTool.scala:551— FriendMessageTool.copyLocal has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 7 (32 pts), if/else 7 (12 pts), boolean chains 1 (nesting depth added 30). 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.
NeblinkService.createInternal (cognitive 45) src/main/scala/nebflow/neblink/NeblinkService.scala:659— NeblinkService.createInternal has cognitive complexity 45 (threshold 15). Drivers by points: loops 9 (45 pts) (nesting depth added 36). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WeixinIlinkBridgePlugin.intake (cognitive 45) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:408— WeixinIlinkBridgePlugin.intake has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 3 (15 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pptx.nfPptxStageMain (cognitive 45) REDACTED:77— pptx.nfPptxStageMain has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 10, error handling 5 (8 pts), loops 6 (8 pts), ternaries 1 (nesting depth added 14). None of this is in the body itself: all 45 points belong to 5 function literals inside it that branch (lines 86, 156, 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.
resetChatForActiveSession (cognitive 45) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2422— resetChatForActiveSession has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 14 (20 pts), boolean chains 4 (nesting depth added 19). Of this number, 40 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initChatSearch (cognitive 45) src/main/resources/web/js/chatSearch.js:127— initChatSearch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 12, other 5, error handling 2, loops 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 45 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 200, 248, 214, …). 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.
AgentSessionExecution.askUserPermission (cognitive 44) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1678— AgentSessionExecution.askUserPermission has cognitive complexity 44 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 6 (13 pts), match/switch 2 (4 pts) (nesting depth added 30). 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.
InteractionHub.handleCancelRequest (cognitive 44) src/main/scala/nebflow/agent/InteractionHub.scala:821— InteractionHub.handleCancelRequest has cognitive complexity 44 (threshold 15). Drivers by points: loops 7 (35 pts), match/switch 2 (6 pts), if/else 3 (nesting depth added 32). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
UpdateOrchestrator.runChain (cognitive 44) src/main/scala/nebflow/core/hotupdate/UpdateOrchestrator.scala:132— UpdateOrchestrator.runChain has cognitive complexity 44 (threshold 15). Drivers by points: loops 7 (28 pts), match/switch 2 (10 pts), if/else 2 (6 pts) (nesting depth added 33). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ScheduledTaskService.triggerTask (cognitive 44) src/main/scala/nebflow/core/scheduler/ScheduledTaskActor.scala:70— ScheduledTaskService.triggerTask has cognitive complexity 44 (threshold 15). Drivers by points: loops 7 (28 pts), match/switch 3 (9 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsSessionChatHandlers.validateAnswerAttachments (cognitive 44) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:134— WsSessionChatHandlers.validateAnswerAttachments has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 3 (11 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
bgAgentWorkStrip.renderStrip (cognitive 44) src/main/resources/web/js/bgAgentWorkStrip.js:120— bgAgentWorkStrip.renderStrip has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 16, ternaries 4 (9 pts), loops 1 (nesting depth added 9). Of this number, 41 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.
onModalKeydown (cognitive 44) src/main/resources/web/js/chatSearch.js:617— onModalKeydown has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 6 (12 pts), boolean chains 7, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergeQueueBootSweep.reconcileOne (cognitive 43) src/main/scala/nebflow/agent/MergeQueueBootSweep.scala:74— MergeQueueBootSweep.reconcileOne has cognitive complexity 43 (threshold 15). Drivers by points: loops 5 (29 pts), if/else 4 (7 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 30). 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.
EditTool.doEdit (cognitive 43) src/main/scala/nebflow/core/tools/EditTool.scala:229— EditTool.doEdit has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 5 (17 pts), boolean chains 1 (nesting depth added 25). 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.
NodeTools.verdictRouteGate (cognitive 43) src/main/scala/nebflow/core/tools/NodeTools.scala:979— NodeTools.verdictRouteGate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 4 (13 pts), boolean chains 7 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsTasksWorkspaceHandlers.handleProjectCreate (cognitive 43) src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:69— WsTasksWorkspaceHandlers.handleProjectCreate has cognitive complexity 43 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 6 (8 pts), match/switch 1 (7 pts), boolean chains 1 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.frame (cognitive 43) reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:924— 20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.frame has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 6, ternaries 4 (6 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.frame (cognitive 43) reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:929— 20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.frame has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 6, ternaries 4 (6 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initCardHeadTouch (cognitive 43) src/main/resources/web/js/mobile/navController.js:321— initCardHeadTouch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20, boolean chains 12, ternaries 5 (10 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 379, finish, a function literal at line 347, …). 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.
sendFiles (cognitive 43) src/main/resources/web/js/attachUpload.js:605— sendFiles has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, ternaries 4 (8 pts), loops 4 (7 pts), error handling 2 (5 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.
nfViewerSource (cognitive 43) src/main/resources/web/js/nfFileCache.js:517— nfViewerSource has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 10, error handling 2 (9 pts), loops 1 (2 pts) (nesting depth added 21). Most of this is not in the body itself: 7 of the 43 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 539, settle). 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.
renderAgentDetail (cognitive 43) src/main/resources/web/js/agentManager.js:274— renderAgentDetail has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 7 (13 pts), boolean chains 12 (nesting depth added 8). Of this number, 20 points are the body's own statements and 23 belong to 11 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.
FlowTreeActor.handleMountTeam (cognitive 42) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:398— FlowTreeActor.handleMountTeam has cognitive complexity 42 (threshold 15). Drivers by points: loops 9 (39 pts), if/else 2 (3 pts) (nesting depth added 31). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ShellSession.adoptAsBackgroundJob (cognitive 42) src/main/scala/nebflow/core/tools/shell.scala:933— ShellSession.adoptAsBackgroundJob has cognitive complexity 42 (threshold 15). Drivers by points: loops 7 (28 pts), match/switch 3 (13 pts), if/else 1 (nesting depth added 31). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsAskHandlers.handleAskOpen (cognitive 42) src/main/scala/nebflow/gateway/WsAskHandlers.scala:48— WsAskHandlers.handleAskOpen has cognitive complexity 42 (threshold 15). Drivers by points: loops 6 (33 pts), if/else 4 (7 pts), match/switch 1 (2 pts) (nesting depth added 31). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsFileOpsHandlers.handlePopReadFile (cognitive 42) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:566— WsFileOpsHandlers.handlePopReadFile has cognitive complexity 42 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 7 (14 pts), boolean chains 1 (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkService.syncLoop (cognitive 42) src/main/scala/nebflow/neblink/NeblinkService.scala:582— NeblinkService.syncLoop has cognitive complexity 42 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 6 (13 pts), match/switch 1 (6 pts), boolean chains 2 (nesting depth added 27). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html.frame (cognitive 42) reports/20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html:851— 20261019_223720_canvas-card-stack-mockup-v2__delegate-nebflow-19bc02b5.html.frame has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 4 (9 pts), boolean chains 7, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localStore.evict (cognitive 42) src/main/resources/web/js/localStore.js:1081— localStore.evict has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 10, loops 4 (8 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.
main.renderBgDropdown::taskRowHtml (cognitive 42) src/main/resources/web/js/main.js:3179— main.renderBgDropdown::taskRowHtml has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 19 (34 pts), boolean chains 8 (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. This shape REPEATS in the file: one other method here (main.renderBgDropdown) 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.
mountDelegateStrip (cognitive 42) src/main/resources/web/js/bgAgentPopup.js:145— mountDelegateStrip has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 23, if/else 8 (9 pts), ternaries 7 (9 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 219, 231, …). 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.
viewHtml (cognitive 42) REDACTED:436— viewHtml has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 7, error handling 4 (6 pts), ternaries 3 (4 pts) (nesting depth added 11). Of this number, 17 points are the body's own statements and 25 belong to 13 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.
CanvasTabs.validate (cognitive 41) src/main/scala/nebflow/core/CanvasTabStore.scala:68— CanvasTabs.validate has cognitive complexity 41 (threshold 15). Drivers by points: loops 8 (36 pts), match/switch 1 (5 pts) (nesting depth added 32). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentControlTool.doStatusBody (cognitive 41) src/main/scala/nebflow/core/tools/AgentControlTool.scala:699— AgentControlTool.doStatusBody has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (31 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 15). 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.
PopTool.requestedPaths (cognitive 41) src/main/scala/nebflow/core/tools/PopTool.scala:270— PopTool.requestedPaths has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 7 (27 pts), if/else 6 (14 pts) (nesting depth added 28). 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.
ProjectTool.showFace (cognitive 41) src/main/scala/nebflow/core/tools/ProjectTool.scala:163— ProjectTool.showFace has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 3 (9 pts), match/switch 2 (6 pts) (nesting depth added 30). 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.
RefResolver.resolve (cognitive 41) src/main/scala/nebflow/gateway/RefResolver.scala:55— RefResolver.resolve has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 2, match/switch 1 (nesting depth added 15). 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.
chat.renderAskUser (cognitive 41) src/main/resources/web/js/chat.js:3021— chat.renderAskUser has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 19, if/else 11 (13 pts), ternaries 4 (6 pts), error handling 2 (3 pts) (nesting depth added 5). Of this number, 24 points are the body's own statements and 17 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
canvasDrop.initCanvasDrop (cognitive 41) src/main/resources/web/js/canvasDrop.js:488— canvasDrop.initCanvasDrop has cognitive complexity 41 (threshold 15). Drivers by points: if/else 28 (30 pts), boolean chains 7, ternaries 4 (nesting depth added 2). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 539, a function literal at line 567, paneOfFocus, …). 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.
taskList.chainEdgesOf (cognitive 41) src/main/resources/web/js/taskList.js:199— taskList.chainEdgesOf has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (11 pts), boolean chains 9, loops 6 (9 pts) (nesting depth added 14). Of this number, 33 points are the body's own statements and 8 belong to 2 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.
keyedDiff (cognitive 41) REDACTED:2986— keyedDiff has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 7, ternaries 2 (6 pts), loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 41) src/main/resources/web/js/main.js:4640— (anonymous) has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 16, loops 5 (7 pts), 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.
RemoteExecutor.executeRemoteBackground (cognitive 40) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:796— RemoteExecutor.executeRemoteBackground has cognitive complexity 40 (threshold 15). Drivers by points: loops 8 (36 pts), if/else 2 (4 pts) (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WikiService.scanRemoteRootProject (cognitive 40) src/main/scala/nebflow/core/wiki/WikiService.scala:586— WikiService.scanRemoteRootProject has cognitive complexity 40 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 3 (13 pts) (nesting depth added 31). 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. This shape REPEATS in the file: one other method here (WikiService.scanRemoteVault) 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.
WikiService.scanRemoteVault (cognitive 40) src/main/scala/nebflow/core/wiki/WikiService.scala:634— WikiService.scanRemoteVault has cognitive complexity 40 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 3 (13 pts) (nesting depth added 31). 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. This shape REPEATS in the file: one other method here (WikiService.scanRemoteRootProject) 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.
SecretsRoutes.routes (cognitive 40) src/main/scala/nebflow/gateway/SecretsRoutes.scala:29— SecretsRoutes.routes has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 14 (26 pts), if/else 10 (14 pts) (nesting depth added 16). 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.
nfFileCache.fetchBlobWithProgress (cognitive 40) src/main/resources/web/js/nfFileCache.js:697— nfFileCache.fetchBlobWithProgress has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 12, error handling 3 (6 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cardRegistry.window.addEventListener("message") (cognitive 40) REDACTED:136— cardRegistry.window.addEventListener("message") has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 2 (7 pts), boolean chains 6 (nesting depth added 19). Of this number, 32 points are the body's own statements and 8 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.
(anonymous) (cognitive 40) REDACTED:136— (anonymous) has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 2 (7 pts), boolean chains 6 (nesting depth added 19). Of this number, 32 points are the body's own statements and 8 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.
bindSectionBody (cognitive 40) src/main/resources/web/js/sidebar/imagegenSection.js:175— bindSectionBody has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (14 pts), ternaries 4, error handling 2 (3 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 217, 194, 210, …). 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.
AgentPingpong.executeSwap (cognitive 39) src/main/scala/nebflow/agent/AgentPingpong.scala:544— AgentPingpong.executeSwap has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (34 pts), match/switch 1 (3 pts), if/else 2 (nesting depth added 27). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LiteralScanner.feed (cognitive 39) src/main/scala/nebflow/gateway/TextStream.scala:362— LiteralScanner.feed has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 24). 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.
NeblinkService.removePeer (cognitive 39) src/main/scala/nebflow/neblink/NeblinkService.scala:326— NeblinkService.removePeer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 5 (15 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_plugin.check_c13 (cognitive 39) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:631— validate_plugin.check_c13 has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (25 pts), error handling 2 (5 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appendToolStreamDelta (cognitive 39) src/main/resources/web/js/chat.js:1551— appendToolStreamDelta has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 18). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 1569). 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.
(anonymous) (cognitive 39) src/main/resources/web/js/explorer.js:1142— (anonymous) has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 11, error handling 1 (3 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 35 points are the body's own statements and 4 belong to 5 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.
selfTest (cognitive 39) src/main/resources/web/js/attachPreviewField.js:423— selfTest has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 28, loops 5 (6 pts), if/else 2 (4 pts), ternaries 1 (nesting depth added 3). Of this number, 36 points are the body's own statements and 3 belong to 6 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.
renderHtmlCard (cognitive 39) REDACTED:381— renderHtmlCard has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (27 pts), error handling 4 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to 14 function items inside it that branch (reloadIfBlank, a function literal at line 462, a function literal at line 564, …). 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.
UpdateStage.stage (cognitive 38) src/main/scala/nebflow/cli/UpdateStage.scala:80— UpdateStage.stage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 2 (8 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionStore.forkSession (cognitive 38) src/main/scala/nebflow/core/SessionStore.scala:950— SessionStore.forkSession has cognitive complexity 38 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 2 (8 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.hotReloadTeam (cognitive 38) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:425— FlowTreeActor.hotReloadTeam has cognitive complexity 38 (threshold 15). Drivers by points: loops 9 (33 pts), match/switch 2 (5 pts) (nesting depth added 27). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentControlTool.doCancel (cognitive 38) src/main/scala/nebflow/core/tools/AgentControlTool.scala:862— AgentControlTool.doCancel has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 5 (9 pts), boolean chains 4 (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.
NodeEditTool.reclaimAbandonedWorktree (cognitive 38) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1756— NodeEditTool.reclaimAbandonedWorktree has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 7 (28 pts), if/else 4 (8 pts), error handling 1 (2 pts) (nesting depth added 26). 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.
NeblinkRoutes.verifyPeerAccess (cognitive 38) src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1347— NeblinkRoutes.verifyPeerAccess has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 7 (25 pts), if/else 9 (12 pts), boolean chains 1 (nesting depth added 21). 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.
PerceptionCore.sendDraft (cognitive 38) src/main/scala/nebflow/perception/PerceptionService.scala:755— PerceptionCore.sendDraft has cognitive complexity 38 (threshold 15). Drivers by points: loops 5 (25 pts), if/else 4 (7 pts), match/switch 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FeishuBridgePlugin.start (cognitive 38) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:219— FeishuBridgePlugin.start has cognitive complexity 38 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 1 (7 pts), if/else 3 (4 pts) (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
chat.renderPermissionPrompt (cognitive 38) src/main/resources/web/js/chat.js:3407— chat.renderPermissionPrompt has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (13 pts), ternaries 4 (6 pts), error handling 1 (nesting depth added 3). Of this number, 23 points are the body's own statements and 15 belong to 2 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.
flowMapArchive.fetchRemoteChains (cognitive 38) src/main/resources/web/js/flowMapArchive.js:314— flowMapArchive.fetchRemoteChains has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (10 pts), ternaries 2 (5 pts), boolean chains 4 (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.
taskList.chainMembersOf (cognitive 38) src/main/resources/web/js/taskList.js:303— taskList.chainMembersOf has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 20, ternaries 6 (11 pts), if/else 2 (4 pts), loops 3 (nesting depth added 7). Of this number, 35 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
dropbox.renderMessage (cognitive 38) src/main/resources/web/js/dropbox.js:755— dropbox.renderMessage has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 14 (32 pts), boolean chains 3, if/else 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.
buildRow (cognitive 38) src/main/resources/web/js/daemons.js:374— buildRow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 9 (10 pts), boolean chains 8 (nesting depth added 9). Most of this is not in the body itself: 15 of the 38 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 448, 457, 431, …). 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.
WebSocketRoutes.deletePathsSafely (cognitive 37) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5970— WebSocketRoutes.deletePathsSafely has cognitive complexity 37 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 3 (11 pts), error handling 1 (6 pts), match/switch 2 (6 pts) (nesting depth added 27). 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.
ProcessManager.degradedIdentity (cognitive 37) src/main/scala/nebflow/cli/ProcessManager.scala:203— ProcessManager.degradedIdentity has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 3 (7 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.
DaemonPanelSchema.validate (cognitive 37) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:470— DaemonPanelSchema.validate has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (33 pts), if/else 2 (3 pts), match/switch 1 (nesting depth added 28). 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.
DaemonPanelSchema.readField (cognitive 37) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:536— DaemonPanelSchema.readField has cognitive complexity 37 (threshold 15). Drivers by points: loops 4 (26 pts), match/switch 3 (8 pts), if/else 2 (3 pts) (nesting depth added 28). 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.
DaemonPanelStore.validateValue (cognitive 37) src/main/scala/nebflow/core/daemon/DaemonPanelStore.scala:154— DaemonPanelStore.validateValue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 5 (17 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.
LoopGuard.loadConfig (cognitive 37) src/main/scala/nebflow/core/processor/LoopGuard.scala:71— LoopGuard.loadConfig has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (35 pts), if/else 2 (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebFetchTool.tryHttp (cognitive 37) src/main/scala/nebflow/core/tools/WebFetchTool.scala:162— WebFetchTool.tryHttp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 7 (11 pts), match/switch 1 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FsOps.deletePathsSafely (cognitive 37) src/main/scala/nebflow/gateway/FsOps.scala:49— FsOps.deletePathsSafely has cognitive complexity 37 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 3 (11 pts), error handling 1 (6 pts), match/switch 2 (6 pts) (nesting depth added 27). 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.
WebSocketRoutes.forwardBridgeInteractionAnswer (cognitive 37) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:606— WebSocketRoutes.forwardBridgeInteractionAnswer has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (33 pts), if/else 2, match/switch 1 (2 pts) (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkRelayTunnel.connectConfigured (cognitive 37) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:516— NeblinkRelayTunnel.connectConfigured has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (33 pts), match/switch 2 (4 pts) (nesting depth added 21). 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.
markdown.renderWikilinks (cognitive 37) src/main/resources/web/js/viewers/markdown.js:277— markdown.renderWikilinks has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 9 (13 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (nesting depth added 13). Of this number, 26 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turnGroup.computeTurnStats (cognitive 37) src/main/resources/web/js/turnGroup.js:157— turnGroup.computeTurnStats has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (9 pts), loops 2 (5 pts), boolean chains 4, error handling 1 (4 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.
AgentSessionExecution.askMcpPermission (cognitive 36) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1855— AgentSessionExecution.askMcpPermission has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 2 (8 pts), match/switch 1 (nesting depth added 27). 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.
CanvasTabs.validateTab (cognitive 36) src/main/scala/nebflow/core/CanvasTabStore.scala:120— CanvasTabs.validateTab has cognitive complexity 36 (threshold 15). Drivers by points: loops 8 (36 pts) (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.apply (cognitive 36) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:291— FlowTreeActor.apply has cognitive complexity 36 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 2 (8 pts) (nesting depth added 27). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentControlTool.withGuardedRecord (cognitive 36) src/main/scala/nebflow/core/tools/AgentControlTool.scala:337— AgentControlTool.withGuardedRecord has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 4 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageGenRoutes.routes (cognitive 36) src/main/scala/nebflow/gateway/ImageGenRoutes.scala:36— ImageGenRoutes.routes has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 6 (25 pts), if/else 6 (11 pts) (nesting depth added 24). 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.
WsConfigHandlers.handleFinishOnboarding (cognitive 36) src/main/scala/nebflow/gateway/WsConfigHandlers.scala:785— WsConfigHandlers.handleFinishOnboarding has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 6 (22 pts), loops 4 (14 pts) (nesting depth added 26). 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.
AttachmentPreviewContract.parseIn (cognitive 36) src/main/scala/nebflow/neblink/AttachmentPreviewContract.scala:222— AttachmentPreviewContract.parseIn has cognitive complexity 36 (threshold 15). Drivers by points: loops 7 (28 pts), match/switch 1 (7 pts), boolean chains 1 (nesting depth added 27). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTransferAction.handleList (cognitive 36) src/main/scala/nebflow/neblink/FileTransferAction.scala:142— FileTransferAction.handleList has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 3 (7 pts), error handling 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.attachmentCard (cognitive 36) REDACTED:1897— messages.attachmentCard has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (13 pts), ternaries 3 (5 pts) (nesting depth added 6). 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.
retargetFileTabs (cognitive 36) src/main/resources/web/js/canvas.js:1057— retargetFileTabs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 6, loops 2 (4 pts), ternaries 3 (4 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.
deckMakeCardEl (cognitive 36) src/main/resources/web/js/canvas.js:2051— deckMakeCardEl has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 11, ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 2111, a function literal at line 2133, a function literal at line 2143, …). 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.
renderSummary (cognitive 36) src/main/resources/web/js/usageDashboard.js:597— renderSummary has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (19 pts), boolean chains 11, if/else 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderHeatmap (cognitive 36) src/main/resources/web/js/usageDashboard.js:697— renderHeatmap has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 5 (8 pts), loops 6, boolean chains 5 (nesting depth added 8). Of this number, 20 points are the body's own statements and 16 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
McpToolGate.classify (cognitive 35) src/main/scala/nebflow/core/McpToolGate.scala:347— McpToolGate.classify has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 10 (32 pts), if/else 3 (nesting depth added 22). 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.
DaemonPanelSchema.readFields (cognitive 35) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:514— DaemonPanelSchema.readFields has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 6 (21 pts), if/else 6 (13 pts), boolean chains 1 (nesting depth added 22). 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.
FlowTreeActor.resumeInterruptedAgent (cognitive 35) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:687— FlowTreeActor.resumeInterruptedAgent has cognitive complexity 35 (threshold 15). Drivers by points: loops 9 (33 pts), match/switch 1 (2 pts) (nesting depth added 25). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
HealthCheck.afterBind (cognitive 35) src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:518— HealthCheck.afterBind has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 7 (11 pts), match/switch 2 (3 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AskUserQuestionTool.parseItems (cognitive 35) src/main/scala/nebflow/core/tools/AskUserQuestionTool.scala:251— AskUserQuestionTool.parseItems has cognitive complexity 35 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 8 (14 pts), boolean chains 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AuthAdminRoutes.routes (cognitive 35) src/main/scala/nebflow/gateway/AuthAdminRoutes.scala:37— AuthAdminRoutes.routes has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 9 (23 pts), if/else 5 (12 pts) (nesting depth added 21). 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.
WeixinIlinkBridgePlugin.askTextLegs (cognitive 35) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:622— WeixinIlinkBridgePlugin.askTextLegs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 5 (15 pts) (nesting depth added 22). 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.
providersUi.showProviderModal (cognitive 35) src/main/resources/web/js/sidebar/providersUi.js:315— providersUi.showProviderModal has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 11, ternaries 5, loops 2 (3 pts) (nesting depth added 5). Of this number, 31 points are the body's own statements and 4 belong to 2 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.
inputModes.updateInputIndicator (cognitive 35) src/main/resources/web/js/input/inputModes.js:25— inputModes.updateInputIndicator has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mergeUpstreamWorktrees (cognitive 35) src/main/resources/web/js/flowMapArchive.js:482— mergeUpstreamWorktrees has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 3 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildMediaStack (cognitive 35) src/main/resources/web/js/popArtifacts.js:553— buildMediaStack has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, ternaries 9 (11 pts), boolean chains 1, error handling 1 (nesting depth added 2). None of this is in the body itself: all 35 points belong to 21 function items inside it that branch (a function literal at line 737, setExpanded, up, …). 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.
showLoginModal (cognitive 35) src/main/resources/web/js/activityBar.js:715— showLoginModal has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 4 (8 pts), boolean chains 7, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 17 function items inside it that branch (render, startFlow, (anonymous)::outside, …). 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.
mintRound (cognitive 35) src/main/resources/web/js/nfTicket.js:205— mintRound has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7 (11 pts), boolean chains 10, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Fallback.classifyError (cognitive 34) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:112— Fallback.classifyError has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 12, match/switch 3 (5 pts) (nesting depth added 4). 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.
NodeEditTool.abandonNode (cognitive 34) src/main/scala/nebflow/core/tools/NodeEditTool.scala:1634— NodeEditTool.abandonNode has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 3 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession.createUnchecked (cognitive 34) src/main/scala/nebflow/core/tools/shell.scala:1560— ShellSession.createUnchecked has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChunkedSendLoop.loop (cognitive 34) src/main/scala/nebflow/dropbox/ChunkTransport.scala:177— ChunkedSendLoop.loop has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 6 (13 pts), boolean chains 1 (nesting depth added 21). 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.
DropboxService.respondToOffer (cognitive 34) src/main/scala/nebflow/dropbox/DropboxService.scala:936— DropboxService.respondToOffer has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 4 (11 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Fallback.classifyBase (cognitive 34) src/main/scala/nebflow/llm/fallback.scala:244— Fallback.classifyBase has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 12, match/switch 3 (5 pts) (nesting depth added 4). 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.
LogtoSilentRelogin.refreshAndRegister (cognitive 34) src/main/scala/nebflow/neblink/LogtoSilentRelogin.scala:53— LogtoSilentRelogin.refreshAndRegister has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 1 (5 pts), if/else 2 (nesting depth added 25). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PerceptionCore.toggleAccount (cognitive 34) src/main/scala/nebflow/perception/PerceptionService.scala:600— PerceptionCore.toggleAccount has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 6 (13 pts) (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
chat.finishAi (cognitive 34) src/main/resources/web/js/chat.js:742— chat.finishAi has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 7 (nesting depth added 14). Of this number, 32 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.
canvasDrop.handleFiles (cognitive 34) src/main/resources/web/js/canvasDrop.js:338— canvasDrop.handleFiles has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 9 (12 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bgAgentPopup.handleBgAgentHistory (cognitive 34) src/main/resources/web/js/bgAgentPopup.js:771— bgAgentPopup.handleBgAgentHistory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 6, loops 2 (4 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.
perception.openConfigCard (cognitive 34) src/main/resources/web/js/perception.js:411— perception.openConfigCard has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 12, if/else 8 (9 pts) (nesting depth added 6). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 463, a function literal at line 497, val, …). 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.
runStream (cognitive 34) src/main/resources/web/js/chatSearch.js:1017— runStream has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, ternaries 5 (6 pts), error handling 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 8 belong to 5 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.
showModal (cognitive 34) src/main/resources/web/js/sidebar/providersUi.js:441— showModal has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 19 (21 pts), boolean chains 7, if/else 4 (6 pts) (nesting depth added 4). None of this is in the body itself: all 34 points belong to 16 function items inside it that branch (renderField, optionHtml, a function literal at line 527, …). 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.
StreamBatching.pipe (cognitive 33) src/main/scala/nebflow/agent/AgentStreamPipelines.scala:139— StreamBatching.pipe has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 9, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LanguageDetector.detectNonEmpty (cognitive 33) src/main/scala/nebflow/agent/LanguageDetector.scala:21— LanguageDetector.detectNonEmpty has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 10, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EntityLoader.findOnDisk (cognitive 33) src/main/scala/nebflow/core/entity/EntityLoader.scala:292— EntityLoader.findOnDisk has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (EntityLoader.findAgentDir) 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.
EntityLoader.findAgentDir (cognitive 33) src/main/scala/nebflow/core/entity/EntityLoader.scala:345— EntityLoader.findAgentDir has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (EntityLoader.findOnDisk) 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.
TaskListStore.closeSync (cognitive 33) src/main/scala/nebflow/core/tools/TaskListTool.scala:726— TaskListStore.closeSync has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (9 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 21). 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.
DropboxService.handleFileResponse (cognitive 33) src/main/scala/nebflow/dropbox/DropboxService.scala:1524— DropboxService.handleFileResponse has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 4 (10 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsFileOpsHandlers.handleWriteFile (cognitive 33) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1164— WsFileOpsHandlers.handleWriteFile has cognitive complexity 33 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ChromeRenderer.render (cognitive 33) src/main/scala/nebflow/social/outbound/RichRenderer.scala:185— ChromeRenderer.render has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 2 (5 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). 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.
login.waitLoop (cognitive 33) src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/login.mjs:120— login.waitLoop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (6 pts), error handling 2 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 16). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.refreshConversations (cognitive 33) REDACTED:447— messages.refreshConversations has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 13, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawFrame (cognitive 33) src/main/resources/web/js/micOrb.js:892— drawFrame has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (7 pts), loops 2 (5 pts), boolean chains 3 (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.
askCard (cognitive 33) src/main/resources/web/js/onboarding.js:488— askCard has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 7). None of this is in the body itself: all 33 points belong to 16 function items inside it that branch (a function literal at line 489, a function literal at line 606, a function literal at line 536, …). 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.
AskAnswerLanding.land (cognitive 32) src/main/scala/nebflow/agent/AskAnswerLanding.scala:111— AskAnswerLanding.land has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 9 (28 pts), loops 2 (3 pts), if/else 1 (nesting depth added 20). 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.
DaemonService.maybeAutoRestart (cognitive 32) src/main/scala/nebflow/core/daemon/DaemonService.scala:443— DaemonService.maybeAutoRestart has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 4 (14 pts), boolean chains 4 (nesting depth added 15). 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.
PostMergeCleanup.run (cognitive 32) src/main/scala/nebflow/core/delegate/PostMergeCleanup.scala:44— PostMergeCleanup.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 18). 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.
FlowTreeActor.running (cognitive 32) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:327— FlowTreeActor.running has cognitive complexity 32 (threshold 15). Drivers by points: loops 7 (30 pts), match/switch 2 (nesting depth added 23). 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.
WikiIndex.parseDoc (cognitive 32) src/main/scala/nebflow/core/wiki/WikiIndex.scala:230— WikiIndex.parseDoc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (28 pts), match/switch 1 (3 pts), loops 1 (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.
PerceptionCore.pollAccount (cognitive 32) src/main/scala/nebflow/perception/PerceptionService.scala:210— PerceptionCore.pollAccount has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 4 (10 pts), match/switch 3 (5 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PerceptionCore.abandonDraft (cognitive 32) src/main/scala/nebflow/perception/PerceptionService.scala:833— PerceptionCore.abandonDraft has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 23). 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.
check_wiki_docs.parse_doc (cognitive 32) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:140— check_wiki_docs.parse_doc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (5 pts), ternaries 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lib.pageState (cognitive 32) REDACTED:442— lib.pageState has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 26, if/else 3, ternaries 2, error handling 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.
orbPresets.loadSaved (cognitive 32) src/main/resources/web/js/orbPresets.js:188— orbPresets.loadSaved has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 pts), boolean chains 6, ternaries 2 (3 pts), error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachments.initGlobalFileDrop (cognitive 32) src/main/resources/web/js/input/attachments.js:233— attachments.initGlobalFileDrop has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 7, error handling 2 (4 pts), ternaries 1 (nesting depth added 4). None of this is in the body itself: all 32 points belong to 8 function items inside it that branch (a function literal at line 273, hasAttach, a function literal at line 249, …). 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.
canvas.deckSnapshotSource (cognitive 32) src/main/resources/web/js/canvas.js:2195— canvas.deckSnapshotSource has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 9, error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.renderBgDropdown (cognitive 32) src/main/resources/web/js/main.js:3133— main.renderBgDropdown has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 26 (43 pts), if/else 18 (27 pts), boolean chains 24, loops 4 (7 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (main.renderBgDropdown::taskRowHtml) 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.
taskPanel.buildCard (cognitive 32) src/main/resources/web/js/mobile/taskPanel.js:122— taskPanel.buildCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (11 pts), boolean chains 10 (nesting depth added 8). Of this number, 25 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderToolPending (cognitive 32) src/main/resources/web/js/chat.js:1208— renderToolPending has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 10). Of this number, 29 points are the body's own statements and 3 belong to 2 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.
mediaEntryCard (cognitive 32) src/main/resources/web/js/chatSearch.js:1821— mediaEntryCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, error handling 2 (6 pts), ternaries 3 (4 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 12 belong to 7 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.
AgentCompactionHandlers.handleEmptyResponse (cognitive 31) src/main/scala/nebflow/agent/AgentCompactionHandlers.scala:312— AgentCompactionHandlers.handleEmptyResponse has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 9 (13 pts), boolean chains 3 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NebflowUI.selectOption (cognitive 31) src/main/scala/nebflow/cli/ui.scala:82— NebflowUI.selectOption has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 2 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CurlTool.call (cognitive 31) src/main/scala/nebflow/core/tools/CurlTool.scala:65— CurlTool.call has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (12 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession.readStream (cognitive 31) src/main/scala/nebflow/core/tools/shell.scala:1180— ShellSession.readStream has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsSessionChatHandlers.handleSecretAwareAnswer (cognitive 31) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:249— WsSessionChatHandlers.handleSecretAwareAnswer has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 5 (10 pts), if/else 5 (6 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FriendService.doSend (cognitive 31) src/main/scala/nebflow/neblink/FriendService.scala:992— FriendService.doSend has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (24 pts), if/else 5 (7 pts) (nesting depth added 19). 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.
PerceptionCore.removeAccount (cognitive 31) src/main/scala/nebflow/perception/PerceptionService.scala:613— PerceptionCore.removeAccount has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (28 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ConfigService.restoreRenamedSecrets (cognitive 31) src/main/scala/nebflow/service/ConfigService.scala:771— ConfigService.restoreRenamedSecrets has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (25 pts), if/else 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
validate_plugin.check_c14 (cognitive 31) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:692— validate_plugin.check_c14 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 8, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chatQueue.renderQueueBar (cognitive 31) src/main/resources/web/js/chatQueue.js:16— chatQueue.renderQueueBar has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 12 (14 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 66, 106, 142, …). 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.
socialPanel.tickSession (cognitive 31) src/main/resources/web/js/socialPanel.js:1741— socialPanel.tickSession has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 5 (9 pts), boolean chains 5, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 1749, sessionLive). 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.
sendDeviceCurrent (cognitive 31) REDACTED:6319— sendDeviceCurrent has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (14 pts), ternaries 2, error handling 1 (nesting depth added 4). Of this number, 27 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderSettings (cognitive 31) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:736— renderSettings has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 12, ternaries 10, if/else 7 (9 pts) (nesting depth added 2). Of this number, 21 points are the body's own statements and 10 belong to 10 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.
fillDetailCard (cognitive 31) src/main/resources/web/js/wikiGraph.js:1500— fillDetailCard has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, ternaries 5 (6 pts), loops 2 (nesting depth added 4). Of this number, 28 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
loadHeatmap (cognitive 31) src/main/resources/web/js/usageDashboard.js:501— loadHeatmap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AskSessionRegistry.loadFromDisk (cognitive 30) src/main/scala/nebflow/core/ask/AskSessions.scala:153— AskSessionRegistry.loadFromDisk has cognitive complexity 30 (threshold 15). Drivers by points: loops 4 (22 pts), match/switch 2 (5 pts), if/else 2, error handling 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.handleReload (cognitive 30) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:551— FlowTreeActor.handleReload has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (22 pts), match/switch 3 (8 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowTreeActor.startFileWatcher (cognitive 30) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:741— FlowTreeActor.startFileWatcher has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6, 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.
HotRestart.requestRestartInternal (cognitive 30) src/main/scala/nebflow/core/hotrestart/HotRestart.scala:157— HotRestart.requestRestartInternal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 3 (12 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginMcpManager.acquire (cognitive 30) src/main/scala/nebflow/core/plugin/PluginMcpManager.scala:44— PluginMcpManager.acquire has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 3 (14 pts), loops 3 (9 pts), if/else 4 (7 pts) (nesting depth added 20). 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.
BrowseGetLoop.run (cognitive 30) src/main/scala/nebflow/core/tools/BrowseGetCursor.scala:236— BrowseGetLoop.run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (8 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.
ChainWriteTool.validateStructure (cognitive 30) src/main/scala/nebflow/core/tools/ChainWriteTool.scala:180— ChainWriteTool.validateStructure has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 1 (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.
PopTool.doCall (cognitive 30) src/main/scala/nebflow/core/tools/PopTool.scala:674— PopTool.doCall has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (7 pts) (nesting depth added 19). 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.
StringMatcher.applyCurlyQuotes (cognitive 30) src/main/scala/nebflow/core/tools/StringMatcher.scala:223— StringMatcher.applyCurlyQuotes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession.startJobHealthCheck (cognitive 30) src/main/scala/nebflow/core/tools/shell.scala:1043— ShellSession.startJobHealthCheck has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 3, match/switch 1 (nesting depth added 13). 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.
check_wiki_docs.build_paragraphs (cognitive 30) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:234— check_wiki_docs.build_paragraphs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 2 (4 pts), loops 3 (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.
paper-download.acquirePdf (cognitive 30) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:143— paper-download.acquirePdf has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, error handling 3, 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.
workline.priorTurnBadgeSettled (cognitive 30) src/main/resources/web/js/workline.js:128— workline.priorTurnBadgeSettled has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
input.dispatchOfflineItem (cognitive 30) src/main/resources/web/js/input.js:1019— input.dispatchOfflineItem has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), ternaries 6 (8 pts), error handling 1 (2 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 9 belong to 5 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.
flowMapTab.rerenderFlowMap (cognitive 30) src/main/resources/web/js/flowMapTab.js:201— flowMapTab.rerenderFlowMap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 4 (5 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowMapTab.applyEdgeDiff (cognitive 30) src/main/resources/web/js/flowMapTab.js:1653— flowMapTab.applyEdgeDiff has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 11). Of this number, 27 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowMapTab.bindFlowMapClicks (cognitive 30) src/main/resources/web/js/flowMapTab.js:2019— flowMapTab.bindFlowMapClicks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 12). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2036, 2020, 2022). 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.
canvas.initCapsuleRing::onDocWheel (cognitive 30) src/main/resources/web/js/canvas.js:3678— canvas.initCapsuleRing::onDocWheel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secretsPanel.onDocumentClick (cognitive 30) src/main/resources/web/js/secretsPanel.js:865— secretsPanel.onDocumentClick has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 2 (4 pts), boolean chains 3 (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.
renderUserBubble (cognitive 30) src/main/resources/web/js/chat.js:460— renderUserBubble has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (10 pts), ternaries 4 (6 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzeSource (cognitive 30) src/main/resources/web/js/viewers/markdown.js:81— analyzeSource has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). Of this number, 23 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RestApiRoutes.computeResolvedFrom (cognitive 29) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3497— RestApiRoutes.computeResolvedFrom has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (5 pts), boolean chains 4 (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.
LocalActorSystem.actorLoop (cognitive 29) src/main/scala/nebflow/actor/ActorSystem.scala:155— LocalActorSystem.actorLoop has cognitive complexity 29 (threshold 15). Drivers by points: loops 9 (25 pts), if/else 2, match/switch 2 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CliRouter.executeSubcommand (cognitive 29) src/main/scala/nebflow/cli/CliRouter.scala:127— CliRouter.executeSubcommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 14). 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.
LogsList.run (cognitive 29) src/main/scala/nebflow/cli/LogsCommand.scala:254— LogsList.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (29 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.
FastMicroCompact.doCompact (cognitive 29) src/main/scala/nebflow/core/compact/FastMicroCompact.scala:75— FastMicroCompact.doCompact has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowTreeActor.restoreInterruptedTurns (cognitive 29) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:652— FlowTreeActor.restoreInterruptedTurns has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (24 pts), match/switch 1 (5 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileRefs.probeFile (cognitive 29) src/main/scala/nebflow/core/tools/FileRefs.scala:704— FileRefs.probeFile has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 4 (18 pts), if/else 6 (7 pts), error handling 2 (4 pts) (nesting depth added 17). 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.
TaskListHistory.readFor (cognitive 29) src/main/scala/nebflow/core/tools/TaskListHistory.scala:238— TaskListHistory.readFor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (6 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.
WsFileOpsHandlers.handleCreateFile (cognitive 29) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:911— WsFileOpsHandlers.handleCreateFile has cognitive complexity 29 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (10 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentIdentitySync.parsePayload (cognitive 29) src/main/scala/nebflow/neblink/AgentIdentitySync.scala:115— AgentIdentitySync.parsePayload has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (27 pts), if/else 2 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WeixinIlinkBridgePlugin.flushTurnEnd (cognitive 29) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1516— WeixinIlinkBridgePlugin.flushTurnEnd has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowMapTab.nodeContentKey (cognitive 29) src/main/resources/web/js/flowMapTab.js:1551— flowMapTab.nodeContentKey has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 22, ternaries 5, if/else 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.
(anonymous) (cognitive 29) src/main/resources/web/js/main.js:1176— (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 8 (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.
chainGateTargets (cognitive 29) src/main/resources/web/js/flowMapTab.js:1093— chainGateTargets has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (5 pts), boolean chains 4, loops 3, other 2 (nesting depth added 7). Of this number, 23 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
keyedDiffMessages (cognitive 29) src/main/resources/web/js/dropbox.js:678— keyedDiffMessages has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 7, loops 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openPane (cognitive 29) src/main/resources/web/js/delegateChainView.js:153— openPane has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 11, ternaries 3 (6 pts) (nesting depth added 7). Of this number, 26 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.
nfCachePut (cognitive 29) src/main/resources/web/js/nfFileCache.js:316— nfCachePut has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (10 pts), error handling 1 (3 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
loadPendingSection (cognitive 29) src/main/resources/web/js/flowViewers.js:215— loadPendingSection has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 4 (5 pts), loops 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 248, 222, 240, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
buildField (cognitive 29) src/main/resources/web/js/daemonPanel.js:149— buildField has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (8 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentPingpong.startShadow (cognitive 28) src/main/scala/nebflow/agent/AgentPingpong.scala:210— AgentPingpong.startShadow has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (27 pts), match/switch 1 (nesting depth added 21). 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.
InteractionHub.handleRequest (cognitive 28) src/main/scala/nebflow/agent/InteractionHub.scala:144— InteractionHub.handleRequest has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (7 pts), match/switch 2 (6 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CliRouter.parseArgs (cognitive 28) src/main/scala/nebflow/cli/CliRouter.scala:214— CliRouter.parseArgs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginList.run (cognitive 28) src/main/scala/nebflow/cli/PluginCommand.scala:44— PluginList.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (nesting depth added 13). 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.
PluginMcpManager.revalidate (cognitive 28) src/main/scala/nebflow/core/plugin/PluginMcpManager.scala:171— PluginMcpManager.revalidate has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (20 pts), match/switch 2 (5 pts), if/else 3 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BgTaskOutputDisk.readSlice (cognitive 28) src/main/scala/nebflow/core/tools/BgTaskOutputDisk.scala:128— BgTaskOutputDisk.readSlice has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (8 pts), boolean chains 1, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageInject.loadOne (cognitive 28) src/main/scala/nebflow/core/tools/ImageInject.scala:189— ImageInject.loadOne has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (8 pts), error handling 1 (5 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.
MailTool.onMailDelivered (cognitive 28) src/main/scala/nebflow/core/tools/MailTool.scala:2412— MailTool.onMailDelivered has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (8 pts), if/else 2 (5 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ScheduleTool.cancelAction (cognitive 28) src/main/scala/nebflow/core/tools/ScheduleTool.scala:220— ScheduleTool.cancelAction has cognitive complexity 28 (threshold 15). Drivers by points: loops 3 (12 pts), match/switch 4 (12 pts), if/else 2 (4 pts) (nesting depth added 19). 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.
ChunkReceiver.applyChunk (cognitive 28) src/main/scala/nebflow/dropbox/ChunkedTransfer.scala:394— ChunkReceiver.applyChunk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 4 (11 pts), boolean chains 1 (nesting depth added 18). 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.
WebSocketRoutes.broadcastServerConfig (cognitive 28) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1612— WebSocketRoutes.broadcastServerConfig has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (28 pts) (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsFileOpsHandlers.readRemoteFile (cognitive 28) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:410— WsFileOpsHandlers.readRemoteFile has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 10 (13 pts) (nesting depth added 12). 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.
PerceptionService.doBoot (cognitive 28) src/main/scala/nebflow/perception/PerceptionService.scala:84— PerceptionService.doBoot has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (28 pts) (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
markdown.onWikilinkClick (cognitive 28) src/main/resources/web/js/viewers/markdown.js:452— markdown.onWikilinkClick has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, error handling 3 (5 pts), ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
explorer.initExplorer (cognitive 28) src/main/resources/web/js/explorer.js:1375— explorer.initExplorer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 9 (nesting depth added 5). Of this number, 14 points are the body's own statements and 14 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.
input.recallQueuedItem (cognitive 28) src/main/resources/web/js/input.js:1238— input.recallQueuedItem has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowViewers.openDefinition (cognitive 28) src/main/resources/web/js/flowViewers.js:340— flowViewers.openDefinition has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, ternaries 11 (12 pts), if/else 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 357, globalDescOf, a function literal at line 376, …). 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.
messages.initMessages (cognitive 28) REDACTED:5107— messages.initMessages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, loops 2, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 5138, 5170, 5124, …). 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.
contacts.render (cognitive 28) src/main/resources/web/js/contacts.js:266— contacts.render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). Of this number, 19 points are the body's own statements and 9 belong to 2 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.
openForwardWindow (cognitive 28) REDACTED:3995— openForwardWindow has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 9 (10 pts), boolean chains 4, loops 2 (nesting depth added 5). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (syncPick, a function literal at line 4080, onEsc, …). 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.
initCapsuleRing::layout (cognitive 28) src/main/resources/web/js/canvas.js:3587— initCapsuleRing::layout has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appendThinkingDelta (cognitive 28) src/main/resources/web/js/chat.js:4060— appendThinkingDelta has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 17 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
persistQueue (cognitive 28) src/main/resources/web/js/input.js:623— persistQueue has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (10 pts), if/else 1 (2 pts), error handling 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 653, 629). 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.
resolveLocalFiles (cognitive 28) src/main/resources/web/js/viewers/shared.js:153— resolveLocalFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8, ternaries 4 (6 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 7 function items inside it that branch (toPath, anchorPath, a function literal at line 200, …). 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.
askModelCard (cognitive 28) src/main/resources/web/js/onboarding.js:667— askModelCard has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, ternaries 3 (5 pts) (nesting depth added 3). None of this is in the body itself: all 28 points belong to 17 function items inside it that branch (probeModelList, a function literal at line 853, ctxValue, …). 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.
startDictation::onresult (cognitive 28) src/main/resources/web/js/voiceEngine.js:566— startDictation::onresult has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AskUserAnswerBridge.deliver (cognitive 27) src/main/scala/nebflow/agent/AskUserAnswerBridge.scala:93— AskUserAnswerBridge.deliver has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 2 (4 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.
ProcessManager.stopVerified (cognitive 27) src/main/scala/nebflow/cli/ProcessManager.scala:294— ProcessManager.stopVerified has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolResultTtl.cleanRequestMessages (cognitive 27) src/main/scala/nebflow/core/compact/ToolResultTtl.scala:60— ToolResultTtl.cleanRequestMessages has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (7 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.
RemoteExecutor.remoteReadImages (cognitive 27) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:707— RemoteExecutor.remoteReadImages has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (16 pts), loops 2 (9 pts), if/else 2 (nesting depth added 19). 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.
RemoteExecutor.raceP2PAndRelay (cognitive 27) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1535— RemoteExecutor.raceP2PAndRelay has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (10 pts), match/switch 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession.probeCharset (cognitive 27) src/main/scala/nebflow/core/tools/shell.scala:1277— ShellSession.probeCharset has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DropboxService.completeTransfer (cognitive 27) src/main/scala/nebflow/dropbox/DropboxService.scala:1144— DropboxService.completeTransfer has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (5 pts), match/switch 1 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DropboxService.handleIncomingOffer (cognitive 27) src/main/scala/nebflow/dropbox/DropboxService.scala:1414— DropboxService.handleIncomingOffer has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 5 (9 pts), match/switch 2 (3 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PerceptionRoutes.routes (cognitive 27) src/main/scala/nebflow/gateway/PerceptionRoutes.scala:21— PerceptionRoutes.routes has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 11 (23 pts), if/else 3 (4 pts) (nesting depth added 13). 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.
SttService.parsePatch (cognitive 27) src/main/scala/nebflow/gateway/SttService.scala:93— SttService.parsePatch has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 3 (7 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FriendRoster.resolve (cognitive 27) src/main/scala/nebflow/neblink/FriendRoster.scala:98— FriendRoster.resolve has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 8 (13 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PerceptionCore.runBillingDigest (cognitive 27) src/main/scala/nebflow/perception/PerceptionService.scala:459— PerceptionCore.runBillingDigest has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (4 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RichFeishuAdapter.deliverCard (cognitive 27) src/main/scala/nebflow/social/outbound/RichFeishuAdapter.scala:282— RichFeishuAdapter.deliverCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (7 pts), match/switch 1 (nesting depth added 16). 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.
validate_plugin.check_c3 (cognitive 27) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:826— validate_plugin.check_c3 has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 10 (11 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wiki-graph-redesign-sample.html.draw (cognitive 27) docs/design/wiki-graph-redesign-sample.html:346— wiki-graph-redesign-sample.html.draw has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (8 pts), if/else 3 (5 pts), loops 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.
explorer.initExplorer (cognitive 27) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1020— explorer.initExplorer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 8 (nesting depth added 5). Of this number, 14 points are the body's own statements and 13 belong to 5 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.
measure.measure (cognitive 27) evidence/20261021_console-load-perf/measure.mjs:91— measure.measure has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), ternaries 3, error handling 1 (2 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 105, a function literal at line 145, a function literal at line 138, …). 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.
nearpath.probeNearPath (cognitive 27) REDACTED:91— nearpath.probeNearPath has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts), ternaries 4, loops 2 (3 pts), error handling 2 (nesting depth added 3). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localStore.ensureAvatar (cognitive 27) src/main/resources/web/js/localStore.js:1340— localStore.ensureAvatar has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 12 (13 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 1352). 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.
explorer.importExternalDrop (cognitive 27) src/main/resources/web/js/explorer.js:493— explorer.importExternalDrop has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3 (6 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachments.addFileAttachment (cognitive 27) src/main/resources/web/js/input/attachments.js:60— attachments.addFileAttachment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 4 (9 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
injectedRows.injectedSourceLabel (cognitive 27) src/main/resources/web/js/chat/injectedRows.js:139— injectedRows.injectedSourceLabel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
interceptBgAgentStep (cognitive 27) src/main/resources/web/js/bgAgentPopup.js:662— interceptBgAgentStep has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
loadSummary (cognitive 27) src/main/resources/web/js/usageDashboard.js:440— loadSummary has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 7, if/else 3 (4 pts), error handling 1, loops 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
upload (cognitive 27) src/main/resources/web/js/askAttachments.js:231— upload has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7 (nesting depth added 4). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (onload, onprogress, fail, …). 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.
normalizeTopology (cognitive 27) src/main/resources/web/js/delegateChainProvider.js:108— normalizeTopology has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 21, ternaries 5, if/else 1. Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 114, 122, 126). 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.
bindAppearanceEvents (cognitive 27) src/main/resources/web/js/orbSettingsUI.js:165— bindAppearanceEvents has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 20 function items inside it that branch (syncSlot, a function literal at line 211, commit, …). 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.
AgentActor.buildEventReminder (cognitive 26) src/main/scala/nebflow/agent/AgentActor.scala:245— AgentActor.buildEventReminder has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (24 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.
PresetStore.migrateGlobalModelChain (cognitive 26) src/main/scala/nebflow/core/presets/PresetStore.scala:376— PresetStore.migrateGlobalModelChain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (7 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentFlowTool.parseSteps (cognitive 26) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:95— AgentFlowTool.parseSteps has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 8 (11 pts), match/switch 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SendMessageToMainChatTool.call (cognitive 26) src/main/scala/nebflow/core/tools/AskTools.scala:84— SendMessageToMainChatTool.call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (9 pts), match/switch 2 (7 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BashTool.executeForeground (cognitive 26) src/main/scala/nebflow/core/tools/BashTool.scala:751— BashTool.executeForeground has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (21 pts), match/switch 1 (5 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DelegateTool.dispatchRemote (cognitive 26) src/main/scala/nebflow/core/tools/DelegateTool.scala:516— DelegateTool.dispatchRemote has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 1 (6 pts), match/switch 2 (6 pts) (nesting depth added 19). 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.
GlobTool.runGlob (cognitive 26) src/main/scala/nebflow/core/tools/GlobTool.scala:172— GlobTool.runGlob has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), error handling 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamTaskCreateTool.call (cognitive 26) src/main/scala/nebflow/core/tools/TeamTaskCreateTool.scala:78— TeamTaskCreateTool.call has cognitive complexity 26 (threshold 15). Drivers by points: loops 3 (12 pts), match/switch 3 (8 pts), if/else 3 (6 pts) (nesting depth added 17). 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.
TeamTaskUpdateTool.call (cognitive 26) src/main/scala/nebflow/core/tools/TeamTaskUpdateTool.scala:136— TeamTaskUpdateTool.call has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 6 (21 pts), if/else 3 (5 pts) (nesting depth added 17). 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.
validate_plugin.check_c10 (cognitive 26) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:520— validate_plugin.check_c10 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
explorer.importExternalDrop (cognitive 26) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:562— explorer.importExternalDrop has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (6 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sim-replay-fold.renderedStream (cognitive 26) reports/20261028_120721_replay-terminal-batch__delegate-nebflow-810dea92/sim-replay-fold.mjs:41— sim-replay-fold.renderedStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 8, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowMapTab.renderFlowMap (cognitive 26) src/main/resources/web/js/flowMapTab.js:1887— flowMapTab.renderFlowMap has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 7 (8 pts), boolean chains 5 (nesting depth added 7). Of this number, 25 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.
bgTaskOutputPopup.pollOnce (cognitive 26) src/main/resources/web/js/bgTaskOutputPopup.js:465— bgTaskOutputPopup.pollOnce has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 5, error handling 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
updateCard.stateLine (cognitive 26) src/main/resources/web/js/updateCard.js:81— updateCard.stateLine has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usageDashboard.renderCurveBars (cognitive 26) src/main/resources/web/js/usageDashboard.js:899— usageDashboard.renderCurveBars has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 6 (8 pts), boolean chains 5, loops 4 (nesting depth added 7). Of this number, 23 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.
(anonymous) (cognitive 26) src/main/resources/web/js/main.js:1986— (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bgTaskOrigin (cognitive 26) src/main/resources/web/js/main.js:3067— bgTaskOrigin has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (9 pts), boolean chains 7 (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.
openTab (cognitive 26) src/main/resources/web/js/canvas.js:628— openTab has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, ternaries 2 (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.
startCreateNode (cognitive 26) src/main/resources/web/js/explorer.js:1524— startCreateNode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 4, boolean chains 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 7 belong 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.
initNeblink (cognitive 26) src/main/resources/web/js/neblink.js:852— initNeblink has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). None of this is in the body itself: all 26 points belong to 7 function items inside it that branch (a function literal at line 862, (anonymous)::keyOf, a function literal at line 856, …). 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.
openPicker::renderResult (cognitive 26) src/main/resources/web/js/workspacePicker.js:388— openPicker::renderResult has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 7 (8 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
activateFloats (cognitive 26) src/main/resources/web/js/mobile/floatController.js:174— activateFloats has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (teardownFloats, a function literal at line 176, a function literal at line 208). 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.
AgentCompactionHandlers.handleTriggerCompaction (cognitive 25) src/main/scala/nebflow/agent/AgentCompactionHandlers.scala:237— AgentCompactionHandlers.handleTriggerCompaction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AskUserAnswerBridge.attachmentInjection (cognitive 25) src/main/scala/nebflow/agent/AskUserAnswerBridge.scala:188— AskUserAnswerBridge.attachmentInjection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (4 pts), boolean chains 2, error handling 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.
CliRouter.dispatchCommand (cognitive 25) src/main/scala/nebflow/cli/CliRouter.scala:63— CliRouter.dispatchCommand has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 4 (8 pts), boolean chains 2 (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.
LoginFlow.whoami (cognitive 25) src/main/scala/nebflow/cli/LoginCommand.scala:402— LoginFlow.whoami has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 3 (6 pts) (nesting depth added 14). 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.
SessionStore.setSessionFromCloud (cognitive 25) src/main/scala/nebflow/core/SessionStore.scala:1325— SessionStore.setSessionFromCloud has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 4 (10 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AskContextAssembler.assemble (cognitive 25) src/main/scala/nebflow/core/ask/AskContextAssembler.scala:77— AskContextAssembler.assemble has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (15 pts), loops 4 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FriendMessageTool.parseToKind (cognitive 25) src/main/scala/nebflow/core/tools/FriendMessageTool.scala:387— FriendMessageTool.parseToKind has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 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.
MailTool.layeredRoute (cognitive 25) src/main/scala/nebflow/core/tools/MailTool.scala:812— MailTool.layeredRoute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), match/switch 2 (4 pts), boolean chains 1 (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.
MultiEditTool.parseEdits (cognitive 25) src/main/scala/nebflow/core/tools/MultiEditTool.scala:107— MultiEditTool.parseEdits has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (12 pts) (nesting depth added 15). 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.
PerceptionMailTool.call (cognitive 25) src/main/scala/nebflow/core/tools/PerceptionMailTool.scala:74— PerceptionMailTool.call has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (9 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.
RemoteExecutor.execute (cognitive 25) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:285— RemoteExecutor.execute has cognitive complexity 25 (threshold 15). Drivers by points: loops 4 (10 pts), match/switch 4 (9 pts), if/else 5, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolLoader.reload (cognitive 25) src/main/scala/nebflow/core/tools/ToolLoader.scala:38— ToolLoader.reload has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (10 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WikiService.remoteDoc (cognitive 25) src/main/scala/nebflow/core/wiki/WikiService.scala:727— WikiService.remoteDoc has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatRoutes.routes (cognitive 25) src/main/scala/nebflow/gateway/ChatRoutes.scala:57— ChatRoutes.routes has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 9 (25 pts) (nesting depth added 16). 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.
OutboundText.unwrapLinks (cognitive 25) src/main/scala/nebflow/social/outbound/OutboundText.scala:66— OutboundText.unwrapLinks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.makeCardEl (cognitive 25) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:875— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.makeCardEl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 9, ternaries 1. None of this is in the body itself: all 25 points belong to 5 function items inside it that branch (a function literal at line 890, a function literal at line 905, a function literal at line 914, …). 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.
markdown.renderBacklinks (cognitive 25) src/main/resources/web/js/viewers/markdown.js:394— markdown.renderBacklinks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 2, error handling 1 (nesting depth added 6). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
epub.viewEpub (cognitive 25) src/main/resources/web/js/viewers/epub.js:16— epub.viewEpub has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (7 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 6). Of this number, 21 points are the body's own statements and 4 belong to 2 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.
delegateChainStub.__setFixture (cognitive 25) src/main/resources/web/js/delegateChainStub.js:502— delegateChainStub.__setFixture has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 3 (5 pts), loops 3 (4 pts) (nesting depth added 7). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowMapTab.layoutNodes (cognitive 25) src/main/resources/web/js/flowMapTab.js:670— flowMapTab.layoutNodes has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 679, a function literal at line 709, visit, …). 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.
flowMapTab.chainCardNode (cognitive 25) src/main/resources/web/js/flowMapTab.js:1191— flowMapTab.chainCardNode has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 3, if/else 1 (2 pts), loops 2 (nesting depth added 12). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
canvas.markIndependentUI (cognitive 25) src/main/resources/web/js/canvas.js:4082— canvas.markIndependentUI has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (7 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.
canvas.reconcileFromServer (cognitive 25) src/main/resources/web/js/canvas.js:4717— canvas.reconcileFromServer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 2 (3 pts), loops 2, ternaries 1 (nesting depth added 7). Of this number, 22 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.
shared.buildThemeVarsCSS (cognitive 25) src/main/resources/web/js/viewers/shared.js:28— shared.buildThemeVarsCSS has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (7 pts), error handling 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ws.attemptLoopbackNearPath (cognitive 25) REDACTED:749— ws.attemptLoopbackNearPath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 4 (5 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
bgTaskOutputPopup.pollRemoteOnce (cognitive 25) src/main/resources/web/js/bgTaskOutputPopup.js:631— bgTaskOutputPopup.pollRemoteOnce has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, ternaries 1 (3 pts), error handling 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
openConversation (cognitive 25) REDACTED:925— openConversation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 4 (6 pts), 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.
showModal (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1837— showModal has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13, boolean chains 6, if/else 4 (6 pts) (nesting depth added 2). None of this is in the body itself: all 25 points belong to 15 function items inside it that branch (renderField, a function literal at line 1911, a function literal at line 1891, …). 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.
saveChannel (cognitive 25) src/main/resources/web/js/socialPanel.js:1278— saveChannel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 2 (4 pts), error handling 2, loops 2 (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.
(anonymous) (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:886— (anonymous) has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
startCreateNode (cognitive 25) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1152— startCreateNode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 4, boolean chains 2 (nesting depth added 6). Of this number, 18 points are the body's own statements and 7 belong 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.
mediaFace (cognitive 25) src/main/resources/web/js/popArtifacts.js:302— mediaFace has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, error handling 1 (3 pts), ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (sync, report, a function literal at line 339, …). 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.
showProviderModal::onConfirm (cognitive 25) src/main/resources/web/js/sidebar/providersUi.js:339— showProviderModal::onConfirm has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts), other 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.
renderList (cognitive 25) src/main/resources/web/js/scheduled-task.js:153— renderList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). Of this number, 23 points are the body's own statements and 2 belong to 5 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.
runProgressAttempt (cognitive 25) src/main/resources/web/js/attachmentPreview.js:394— runProgressAttempt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 2 (3 pts), ternaries 2 (nesting depth added 4). Of this number, 23 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
openLightbox (cognitive 25) src/main/resources/web/js/lightbox.js:155— openLightbox has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 4 (8 pts), boolean chains 4 (nesting depth added 7). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 11 function items inside it that branch (onerror, a function literal at line 226, fail, …). 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.
ConfigValidateSub.run (cognitive 24) src/main/scala/nebflow/cli/ConfigInspectCommand.scala:71— ConfigValidateSub.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (5 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompactUtils.removeOldToolResultMessages (cognitive 24) src/main/scala/nebflow/core/compact/CompactUtils.scala:102— CompactUtils.removeOldToolResultMessages has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 8 (10 pts), boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FullCompact.buildFileRestoreSection (cognitive 24) src/main/scala/nebflow/core/compact/FullCompact.scala:358— FullCompact.buildFileRestoreSection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (3 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.
ExternalSessionRunner.continueExternal (cognitive 24) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:217— ExternalSessionRunner.continueExternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStuckWatcher.checkL3Outcome (cognitive 24) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1879— TaskStuckWatcher.checkL3Outcome has cognitive complexity 24 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 3 (9 pts), if/else 2 (6 pts) (nesting depth added 16). 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.
DelegateTool.internalSpawn (cognitive 24) src/main/scala/nebflow/core/tools/DelegateTool.scala:446— DelegateTool.internalSpawn has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (18 pts), match/switch 3 (5 pts), if/else 1 (nesting depth added 16). 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.
ReadTool.readTextFile (cognitive 24) src/main/scala/nebflow/core/tools/ReadTool.scala:161— ReadTool.readTextFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 3 (5 pts), error handling 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession.execute (cognitive 24) src/main/scala/nebflow/core/tools/shell.scala:193— ShellSession.execute has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (5 pts), match/switch 1 (4 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DropboxUtil.reserveAndPlace (cognitive 24) src/main/scala/nebflow/dropbox/DropboxUtil.scala:223— DropboxUtil.reserveAndPlace has cognitive complexity 24 (threshold 15). Drivers by points: error handling 5 (12 pts), if/else 5 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketRoutes.handleBridgeMessage (cognitive 24) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:903— WebSocketRoutes.handleBridgeMessage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 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.
WsFileOpsHandlers.handleTextIndex (cognitive 24) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:770— WsFileOpsHandlers.handleTextIndex has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (20 pts), boolean chains 2, if/else 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTransferAction.handleLegacyAndChunked (cognitive 24) src/main/scala/nebflow/neblink/FileTransferAction.scala:87— FileTransferAction.handleLegacyAndChunked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PerceptionCore.createDraft (cognitive 24) src/main/scala/nebflow/perception/PerceptionService.scala:688— PerceptionCore.createDraft has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (21 pts), error handling 1 (3 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
validate_plugin.check_c5 (cognitive 24) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:921— validate_plugin.check_c5 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (5 pts), error handling 2 (4 pts), loops 2, 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.
lib.ensureTab (cognitive 24) REDACTED:402— lib.ensureTab has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (6 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
html.bindZoomBridge (cognitive 24) REDACTED:392— html.bindZoomBridge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6, loops 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 395). 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.
pdf.viewPdf::renderAll (cognitive 24) src/main/resources/web/js/viewers/pdf.js:112— pdf.viewPdf::renderAll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, error handling 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cardRegistry.buildThemeVarsCSS (cognitive 24) REDACTED:23— cardRegistry.buildThemeVarsCSS has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (7 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secretsPanel.onKeydown (cognitive 24) src/main/resources/web/js/secretsPanel.js:827— secretsPanel.onKeydown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convRow (cognitive 24) REDACTED:603— convRow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 6 (9 pts), boolean chains 3 (nesting depth added 4). Of this number, 17 points are the body's own statements and 7 belong to 2 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.
fillLocalThumbs (cognitive 24) REDACTED:4505— fillLocalThumbs has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (9 pts), if/else 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 4506). 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.
renderTable (cognitive 24) src/main/resources/web/js/usageDashboard.js:1086— renderTable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
topologyOf (cognitive 24) src/main/resources/web/js/delegatePanoramaView.js:76— topologyOf has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 18, ternaries 5, if/else 1. Of this number, 12 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
renderFriendInputRef (cognitive 24) src/main/resources/web/js/reference.js:338— renderFriendInputRef has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, ternaries 4 (nesting depth added 1). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (toggle, syncExpand, overflowNow, …). 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.
renderWithRegistry (cognitive 24) REDACTED:617— renderWithRegistry has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), error handling 2 (4 pts) (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.
refresh (cognitive 24) src/main/resources/web/js/delegateChainProvider.js:188— refresh has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (8 pts), error handling 2, loops 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 21 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AgentSessionExecution.startDirectCompaction (cognitive 23) src/main/scala/nebflow/agent/AgentSessionExecution.scala:371— AgentSessionExecution.startDirectCompaction has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
InteractionHub.handleCleanupForSession (cognitive 23) src/main/scala/nebflow/agent/InteractionHub.scala:708— InteractionHub.handleCleanupForSession has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 4 (8 pts), match/switch 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LogsCommand.tailLines (cognitive 23) src/main/scala/nebflow/cli/LogsCommand.scala:169— LogsCommand.tailLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LogsTail.run (cognitive 23) src/main/scala/nebflow/cli/LogsCommand.scala:310— LogsTail.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (10 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergeArtifactCare.triageUntracked (cognitive 23) src/main/scala/nebflow/core/delegate/MergeArtifactCare.scala:227— MergeArtifactCare.triageUntracked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowTreeActor.createSingleTeamSession (cognitive 23) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:489— FlowTreeActor.createSingleTeamSession has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (6 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MailDeliveryDedup.tryDeliver (cognitive 23) src/main/scala/nebflow/core/flow/MailDeliveryDedup.scala:108— MailDeliveryDedup.tryDeliver has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (9 pts), match/switch 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.
HotRestart.begin (cognitive 23) src/main/scala/nebflow/core/hotrestart/HotRestart.scala:320— HotRestart.begin has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 4 (11 pts) (nesting depth added 15). 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.
PluginRegistry.installFromSync (cognitive 23) src/main/scala/nebflow/core/plugin/PluginRegistry.scala:1226— PluginRegistry.installFromSync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (5 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiffUtil.makeUnifiedDiff (cognitive 23) src/main/scala/nebflow/core/tools/DiffUtil.scala:83— DiffUtil.makeUnifiedDiff has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MailTool.deliverToRootNodeRef (cognitive 23) src/main/scala/nebflow/core/tools/MailTool.scala:1142— MailTool.deliverToRootNodeRef has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (7 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.
NodeEditTool.createNode (cognitive 23) src/main/scala/nebflow/core/tools/NodeEditTool.scala:993— NodeEditTool.createNode has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (18 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ProjectTool.listFace (cognitive 23) src/main/scala/nebflow/core/tools/ProjectTool.scala:142— ProjectTool.listFace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskBoardTool.nodeDispatch (cognitive 23) src/main/scala/nebflow/core/tools/TaskBoardTool.scala:180— TaskBoardTool.nodeDispatch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 10). 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.
AuthRoutes.beginPkceLogin (cognitive 23) src/main/scala/nebflow/gateway/AuthRoutes.scala:78— AuthRoutes.beginPkceLogin has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (9 pts), match/switch 1 (nesting depth added 14). 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.
NfTicketStore.refreshTtlFromConfig (cognitive 23) src/main/scala/nebflow/gateway/NfTicketStore.scala:69— NfTicketStore.refreshTtlFromConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (11 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.
OpenAiAdapter.toOpenAiMessages (cognitive 23) src/main/scala/nebflow/llm/providers/OpenAiAdapter.scala:105— OpenAiAdapter.toOpenAiMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 6 (10 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NeblinkPresenceService.openConnection (cognitive 23) src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:511— NeblinkPresenceService.openConnection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DraftCodec.parse (cognitive 23) src/main/scala/nebflow/perception/DraftCodec.scala:33— DraftCodec.parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 1 (4 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WeixinAskLeg.parseReply (cognitive 23) src/main/scala/nebflow/social/WeixinAskLeg.scala:273— WeixinAskLeg.parseReply has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
paper-download.findPdfTarget (cognitive 23) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:74— paper-download.findPdfTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 9 belong to 2 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.
i18n.applyLocaleToHtml (cognitive 23) src/main/resources/web/js/i18n.js:62— i18n.applyLocaleToHtml has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 2 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
persistence.mountHistoryPageChunked (cognitive 23) src/main/resources/web/js/persistence.js:1590— persistence.mountHistoryPageChunked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 3 belong to 2 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.
wikiGraph.openDoc (cognitive 23) src/main/resources/web/js/wikiGraph.js:1656— wikiGraph.openDoc has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ws.connect (cognitive 23) REDACTED:1017— ws.connect has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (6 pts), error handling 1, ternaries 1 (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.
taskList.chainDepthsOf (cognitive 23) src/main/resources/web/js/taskList.js:235— taskList.chainDepthsOf has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (9 pts), boolean chains 7, if/else 3 (7 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.
messages.loadOlderMessages (cognitive 23) REDACTED:3189— messages.loadOlderMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.adaptDeviceMessage (cognitive 23) REDACTED:5512— messages.adaptDeviceMessage has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 10, if/else 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.
syncConversation (cognitive 23) REDACTED:867— syncConversation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
oursBySenderId (cognitive 23) REDACTED:2780— oursBySenderId has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (10 pts), ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
settleOptimisticAttach (cognitive 23) REDACTED:4548— settleOptimisticAttach has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (9 pts), ternaries 4 (nesting depth added 2). Of this number, 14 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
(anonymous) (cognitive 23) src/main/resources/web/js/main.js:875— (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tabAnchor (cognitive 23) src/main/resources/web/js/canvas.js:76— tabAnchor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, other 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 1 belongs to 5 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.
sanitizeForCache (cognitive 23) src/main/resources/web/js/persistence.js:225— sanitizeForCache has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 5). Of this number, 17 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.
initScrollFollow (cognitive 23) src/main/resources/web/js/utils.js:1136— initScrollFollow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1143, 1179, 1174). 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.
revealRow (cognitive 23) src/main/resources/web/js/secretsPanel.js:564— revealRow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 592, 604). 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.
applyAgentMeta (cognitive 23) src/main/resources/web/js/flowAgentPopup.js:686— applyAgentMeta has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
convergeAvatar (cognitive 23) src/main/resources/web/js/agentProfile.js:118— convergeAvatar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, error handling 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 128, (anonymous)::(anonymous)::onload, a function literal at line 135, …). 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.
NeblinkPresenceService.openConnection (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:498— NeblinkPresenceService.openConnection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 4 (6 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.
WebSocketRoutes.uploadsRoutes (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6250— WebSocketRoutes.uploadsRoutes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 10). 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.
StatusCheck.run (cognitive 22) src/main/scala/nebflow/cli/SystemCommands.scala:358— StatusCheck.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, match/switch 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.
FlowDagCompiler.scanPlaceholders (cognitive 22) src/main/scala/nebflow/core/entity/FlowDagCompiler.scala:436— FlowDagCompiler.scanPlaceholders has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 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.
TaskSearchIndex.search (cognitive 22) src/main/scala/nebflow/core/index/TaskSearchIndex.scala:294— TaskSearchIndex.search has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (10 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStuckWatcher.classify (cognitive 22) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:305— TaskStuckWatcher.classify has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (21 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.
SecretInjection.materialize (cognitive 22) src/main/scala/nebflow/core/secrets/SecretInjection.scala:122— SecretInjection.materialize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskListStore.listSync (cognitive 22) src/main/scala/nebflow/core/tools/TaskListTool.scala:1028— TaskListStore.listSync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 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.
WebSearchTool.searchAcademic (cognitive 22) src/main/scala/nebflow/core/tools/WebSearchTool.scala:324— WebSearchTool.searchAcademic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsoleTicketRoutes.ticketRoutes (cognitive 22) src/main/scala/nebflow/gateway/ConsoleTicketRoutes.scala:46— ConsoleTicketRoutes.ticketRoutes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (10 pts), boolean chains 1 (nesting depth added 12). 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.
GatewayAuth.authenticate (cognitive 22) src/main/scala/nebflow/gateway/GatewayAuth.scala:123— GatewayAuth.authenticate has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 6 (8 pts), boolean chains 4 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StaticRoutes.assetsRoutesFor (cognitive 22) src/main/scala/nebflow/gateway/StaticRoutes.scala:516— StaticRoutes.assetsRoutesFor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 10). 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.
WikiRoutes.routes (cognitive 22) src/main/scala/nebflow/gateway/WikiRoutes.scala:45— WikiRoutes.routes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WsSessionChatHandlers.handleCommand (cognitive 22) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:827— WsSessionChatHandlers.handleCommand has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 1, match/switch 1 (nesting depth added 15). 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.
WsSessionChatHandlers.handleCreateAgentSession (cognitive 22) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:1332— WsSessionChatHandlers.handleCreateAgentSession has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsSystemHandlers.handleRemoteUpdate (cognitive 22) src/main/scala/nebflow/gateway/WsSystemHandlers.scala:468— WsSystemHandlers.handleRemoteUpdate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTransferAction.handle (cognitive 22) src/main/scala/nebflow/neblink/FileTransferAction.scala:49— FileTransferAction.handle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (6 pts), match/switch 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeixinIlinkBridgePlugin.deliverLongShotMedia (cognitive 22) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1729— WeixinIlinkBridgePlugin.deliverLongShotMedia has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (6 pts) (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.
OutboundText.plainLine (cognitive 22) src/main/scala/nebflow/social/outbound/OutboundText.scala:115— OutboundText.plainLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_wiki_docs.build_graph (cognitive 22) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:478— check_wiki_docs.build_graph has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 2 (6 pts), loops 4 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workline.turnAnchor (cognitive 22) src/main/resources/web/js/workline.js:194— workline.turnAnchor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LargeTextView.prefetch (cognitive 22) src/main/resources/web/js/viewers/largeText.js:484— LargeTextView.prefetch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mergeQueueView.mergeQueueView (cognitive 22) src/main/resources/web/js/mergeQueueView.js:48— mergeQueueView.mergeQueueView has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, ternaries 5, if/else 4. Of this number, 14 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
flowMapTab.applyNodeDiff (cognitive 22) src/main/resources/web/js/flowMapTab.js:1603— flowMapTab.applyNodeDiff has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 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.
canvas.deckTypeFamily (cognitive 22) src/main/resources/web/js/canvas.js:1689— canvas.deckTypeFamily has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, boolean chains 8. 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.
taskList.foldedRowsOf (cognitive 22) src/main/resources/web/js/taskList.js:354— taskList.foldedRowsOf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 7). Of this number, 21 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.
friendsApi.downloadAttachment (cognitive 22) src/main/resources/web/js/friendsApi.js:717— friendsApi.downloadAttachment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contacts.doRefresh (cognitive 22) src/main/resources/web/js/contacts.js:161— contacts.doRefresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, loops 2, error handling 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.
sweepBgTerminalRows (cognitive 22) src/main/resources/web/js/main.js:2962— sweepBgTerminalRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loadPresetsSection (cognitive 22) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1016— loadPresetsSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 10 function items inside it that branch (onclick, a function literal at line 1070, a function literal at line 1056, …). 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.
writeAvatar (cognitive 22) src/main/resources/web/js/localStore.js:897— writeAvatar has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 3, ternaries 3, error handling 1. Of this number, 19 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pollDelegateProgress (cognitive 22) src/main/resources/web/js/taskList.js:945— pollDelegateProgress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 8, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 962, 953). 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.
buildInjectedRow (cognitive 22) src/main/resources/web/js/chat/injectedRows.js:239— buildInjectedRow has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 3 (4 pts) (nesting depth added 2). Of this number, 20 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
projectRow (cognitive 22) src/main/resources/web/js/delegateChainProvider.js:72— projectRow has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 17, ternaries 4, if/else 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.
WebSocketRoutes.broadcastServerConfig (cognitive 21) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1044— WebSocketRoutes.broadcastServerConfig has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.nfCredentialDenyLayer (cognitive 21) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5621— WebSocketRoutes.nfCredentialDenyLayer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (20 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.
SubAgentStartupRecovery.watchdogSweep (cognitive 21) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:310— SubAgentStartupRecovery.watchdogSweep has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CanvasTabs.validateTombEntry (cognitive 21) src/main/scala/nebflow/core/CanvasTabStore.scala:109— CanvasTabs.validateTombEntry has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
UsageRecordStore.scanLines (cognitive 21) src/main/scala/nebflow/core/UsageRecordStore.scala:428— UsageRecordStore.scanLines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergeQueue.memberFromJson (cognitive 21) src/main/scala/nebflow/core/delegate/MergeQueue.scala:178— MergeQueue.memberFromJson has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentIdentityStore.applyRemote (cognitive 21) src/main/scala/nebflow/core/entity/AgentIdentityStore.scala:148— AgentIdentityStore.applyRemote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (7 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.
FlowTreeActor.cleanupTeamInstance (cognitive 21) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:463— FlowTreeActor.cleanupTeamInstance has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BashTool.autoBackground (cognitive 21) src/main/scala/nebflow/core/tools/BashTool.scala:858— BashTool.autoBackground has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BrowseGetCursor.parseReply (cognitive 21) src/main/scala/nebflow/core/tools/BrowseGetCursor.scala:59— BrowseGetCursor.parseReply has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 1, match/switch 1 (nesting depth added 13). 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.
GlobTool.call (cognitive 21) src/main/scala/nebflow/core/tools/GlobTool.scala:80— GlobTool.call has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 1 (3 pts), match/switch 2 (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.
WikiService.readVaultDoc (cognitive 21) src/main/scala/nebflow/core/wiki/WikiService.scala:832— WikiService.readVaultDoc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (9 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DropboxChunkHeaderParser.parse (cognitive 21) src/main/scala/nebflow/dropbox/DropboxChunkHeaderParser.scala:25— DropboxChunkHeaderParser.parse has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DropboxService.offerOne (cognitive 21) src/main/scala/nebflow/dropbox/DropboxService.scala:841— DropboxService.offerOne has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (5 pts), match/switch 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
GatewayMain.startMcpServers (cognitive 21) src/main/scala/nebflow/gateway/GatewayMain.scala:276— GatewayMain.startMcpServers has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RegistryRoutes.routes (cognitive 21) src/main/scala/nebflow/gateway/RegistryRoutes.scala:23— RegistryRoutes.routes has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 5 (7 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TextStreamSearch.resolveStreamPath (cognitive 21) src/main/scala/nebflow/gateway/TextStreamSearch.scala:99— TextStreamSearch.resolveStreamPath has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebSocketRoutes.resolveAgentDef (cognitive 21) src/main/scala/nebflow/gateway/WebSocketRoutes.scala:104— WebSocketRoutes.resolveAgentDef has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 2 (nesting depth added 13). 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.
WsFileOpsHandlers.handleCreateDir (cognitive 21) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:958— WsFileOpsHandlers.handleCreateDir has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkService.upsertPeer (cognitive 21) src/main/scala/nebflow/neblink/NeblinkService.scala:316— NeblinkService.upsertPeer has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkUpdateConvergence.evaluate (cognitive 21) src/main/scala/nebflow/neblink/NeblinkUpdateConvergence.scala:65— NeblinkUpdateConvergence.evaluate has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RelayFrameSender.enqueueAndAwait (cognitive 21) src/main/scala/nebflow/neblink/PortalTunnelBridge.scala:1164— RelayFrameSender.enqueueAndAwait has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 4 (8 pts), match/switch 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OtpExtractor.extract (cognitive 21) src/main/scala/nebflow/perception/OtpExtractor.scala:50— OtpExtractor.extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (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.
WeixinIlinkBridgePlugin.noteSendHealth (cognitive 21) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1351— WeixinIlinkBridgePlugin.noteSendHealth has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 6. 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.
sidebar.showProviderModal (cognitive 21) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1787— sidebar.showProviderModal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 5. Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nfFileCache.evictToBudget (cognitive 21) src/main/resources/web/js/nfFileCache.js:225— nfFileCache.evictToBudget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diffCanvas.renderReader (cognitive 21) src/main/resources/web/js/diffCanvas.js:107— diffCanvas.renderReader has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (6 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 12 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, 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.
chat.finishThinking (cognitive 21) src/main/resources/web/js/chat.js:4190— chat.finishThinking has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (3 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.
neblink.fetchNeblinkStatus (cognitive 21) src/main/resources/web/js/neblink.js:296— neblink.fetchNeblinkStatus has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, ternaries 3, if/else 2, error handling 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.
dropbox.handleFilesSelected (cognitive 21) src/main/resources/web/js/dropbox.js:553— dropbox.handleFilesSelected has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, ternaries 2 (4 pts), if/else 3, loops 1 (nesting depth added 2). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
messages.jumpToQuote (cognitive 21) REDACTED:3747— messages.jumpToQuote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7 (nesting depth added 4). 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, split the body into named stages: move each independent 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· state (cognitive 21) · ×1
state (cognitive 21) src/main/resources/web/js/canvas.js:3165— state has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 18, boolean chains 3. 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.
ensureCardChannel::onmessage (cognitive 21) src/main/resources/web/js/canvas.js:4046— ensureCardChannel::onmessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 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.
renderAskAttachments (cognitive 21) src/main/resources/web/js/chat.js:2924— renderAskAttachments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 6 (9 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (onclick, (anonymous)::onclick, a function literal at line 2926, …). 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.
onGridKeydown (cognitive 21) src/main/resources/web/js/usageDashboard.js:392— onGridKeydown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, ternaries 4 (8 pts), boolean chains 3 (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.
claim (cognitive 21) src/main/resources/web/js/sendState.js:252— claim has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), ternaries 3 (nesting depth added 1). Of this number, 15 points are the body's own statements and 6 belong to 6 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.
AgentFinishTurn.handleLlmCompleteBranch (cognitive 20) src/main/scala/nebflow/agent/AgentFinishTurn.scala:27— AgentFinishTurn.handleLlmCompleteBranch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7 (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.
UnifiedMedia.imageBlocksOf (cognitive 20) src/main/scala/nebflow/bridge/UnifiedMedia.scala:79— UnifiedMedia.imageBlocksOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
McpToolRef.parse (cognitive 20) src/main/scala/nebflow/core/McpToolGate.scala:163— McpToolRef.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (20 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AskServices.assembleIfDue (cognitive 20) src/main/scala/nebflow/core/ask/AskGatewayServices.scala:76— AskServices.assembleIfDue has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 1 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
EntityLoader.listAgents (cognitive 20) src/main/scala/nebflow/core/entity/EntityLoader.scala:204— EntityLoader.listAgents has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlowDagRunner.apply (cognitive 20) src/main/scala/nebflow/core/flow/FlowDagRunner.scala:46— FlowDagRunner.apply has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (6 pts), match/switch 2 (5 pts) (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.
TeamSessionRegistry.resolveSessionId (cognitive 20) src/main/scala/nebflow/core/flow/FlowTreeActor.scala:150— TeamSessionRegistry.resolveSessionId has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowTreeRegistry.getOrCreate (cognitive 20) src/main/scala/nebflow/core/flow/FlowTreeRegistry.scala:83— FlowTreeRegistry.getOrCreate has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (12 pts), match/switch 3 (6 pts), if/else 2 (nesting depth added 12). 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.
McpManager.connectWithTransport (cognitive 20) src/main/scala/nebflow/core/mcp/McpManager.scala:99— McpManager.connectWithTransport has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (5 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FileTaskStore.renderForPrompt (cognitive 20) src/main/scala/nebflow/core/task/TaskStore.scala:465— FileTaskStore.renderForPrompt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelegateTool.spawnBackground (cognitive 20) src/main/scala/nebflow/core/tools/DelegateTool.scala:701— DelegateTool.spawnBackground has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 5 (7 pts), boolean chains 2 (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.
ReadTool.call (cognitive 20) src/main/scala/nebflow/core/tools/ReadTool.scala:113— ReadTool.call has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 4 (6 pts), loops 1 (4 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TaskListStore.renderShow (cognitive 20) src/main/scala/nebflow/core/tools/TaskListTool.scala:962— TaskListStore.renderShow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2, match/switch 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.
TaskTool.dispatchSync (cognitive 20) src/main/scala/nebflow/core/tools/TaskTool.scala:77— TaskTool.dispatchSync has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 5 (6 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DropboxService.probeTransfer (cognitive 20) src/main/scala/nebflow/dropbox/DropboxService.scala:1301— DropboxService.probeTransfer has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (6 pts), match/switch 2 (5 pts) (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.
AssetVersions.versionOf (cognitive 20) src/main/scala/nebflow/gateway/AssetVersions.scala:43— AssetVersions.versionOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NfFilePolicy.nfFileVerdict (cognitive 20) src/main/scala/nebflow/gateway/NfFilePolicy.scala:512— NfFilePolicy.nfFileVerdict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 2 (7 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsFileOpsHandlers.handleMovePath (cognitive 20) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1064— WsFileOpsHandlers.handleMovePath has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (12 pts), match/switch 2 (5 pts), if/else 2, boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsSessionChatHandlers.handleCancelAgent (cognitive 20) src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:527— WsSessionChatHandlers.handleCancelAgent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (10 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnthropicAdapter.toAnthropicMessages (cognitive 20) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:40— AnthropicAdapter.toAnthropicMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (7 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AgentIdentitySync.pushIdentity (cognitive 20) src/main/scala/nebflow/neblink/AgentIdentitySync.scala:234— AgentIdentitySync.pushIdentity has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 2 (9 pts), if/else 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FriendRoster.resolveGroup (cognitive 20) src/main/scala/nebflow/neblink/FriendRoster.scala:199— FriendRoster.resolveGroup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsReasmBuffer.feed (cognitive 20) src/main/scala/nebflow/neblink/PortalTunnelBridge.scala:1610— WsReasmBuffer.feed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeishuBridgePlugin.intake (cognitive 20) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:272— FeishuBridgePlugin.intake has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 2 (8 pts), loops 3 (6 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RichKind.of (cognitive 20) src/main/scala/nebflow/social/outbound/RichKind.scala:99— RichKind.of has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
20261028_canvas-ask-mode-mockup-v2.html.makeDock (cognitive 20) docs/design/20261028_canvas-ask-mode-mockup-v2.html:836— 20261028_canvas-ask-mode-mockup-v2.html.makeDock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 922, 914, 907, …). 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.
20261028_canvas-ask-mode-mockup.html.makeAskWin (cognitive 20) docs/design/20261028_canvas-ask-mode-mockup.html:936— 20261028_canvas-ask-mode-mockup.html.makeAskWin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 989, 964, 962, …). 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.
sim-replay-fold.segment (cognitive 20) reports/20261028_120721_replay-terminal-batch__delegate-nebflow-810dea92/sim-replay-fold.mjs:74— sim-replay-fold.segment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RcChargeSteps.RcChargeSteps (cognitive 20) src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/src/RcChargeSteps.tsx:92— RcChargeSteps.RcChargeSteps has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 3, if/else 3, loops 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
markdown.resolveWikiTarget (cognitive 20) src/main/resources/web/js/viewers/markdown.js:236— markdown.resolveWikiTarget has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (4 pts) (nesting depth added 2). Of this number, 15 points are the body's own statements and 5 belong to 4 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.
flowMapTab.handleNodeWsEvent (cognitive 20) src/main/resources/web/js/flowMapTab.js:2316— flowMapTab.handleNodeWsEvent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
canvas.showCanvasRefMenu (cognitive 20) src/main/resources/web/js/canvas.js:161— canvas.showCanvasRefMenu has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachPreviewField.declarePreviewOf (cognitive 20) src/main/resources/web/js/attachPreviewField.js:289— attachPreviewField.declarePreviewOf has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 6. 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.
messages.hydrateGroupSenderNames (cognitive 20) REDACTED:1082— messages.hydrateGroupSenderNames has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), error handling 1, loops 1, ternaries 1 (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.
contacts.syncDeviceUpdateUI (cognitive 20) src/main/resources/web/js/contacts.js:529— contacts.syncDeviceUpdateUI has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, ternaries 2 (nesting depth added 5). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 532). 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.
usageDashboard.buildShell (cognitive 20) src/main/resources/web/js/usageDashboard.js:157— usageDashboard.buildShell has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 7 (9 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 206, 232, 312, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
plugins.applyRegistryStates (cognitive 20) src/main/resources/web/js/plugins.js:743— plugins.applyRegistryStates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins.bindCardEvents (cognitive 20) src/main/resources/web/js/plugins.js:936— plugins.bindCardEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (toggleItem, a function literal at line 951, a function literal at line 964, …). 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.
(anonymous) (cognitive 20) src/main/resources/web/js/main.js:1707— (anonymous) has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderAskUserHistory (cognitive 20) src/main/resources/web/js/chat.js:3275— renderAskUserHistory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 2 belong to 2 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.
dispatchUserMessageFrames (cognitive 20) src/main/resources/web/js/input.js:130— dispatchUserMessageFrames has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 6, if/else 4 (5 pts), loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
loadAfterPages (cognitive 20) src/main/resources/web/js/chatSearch.js:1143— loadAfterPages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2, ternaries 1 (2 pts), error handling 1, other 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applyCardSummary (cognitive 20) src/main/resources/web/js/projectTab.js:1049— applyCardSummary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (7 pts), boolean chains 5, other 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.
hydrateMedia (cognitive 20) src/main/resources/web/js/popArtifacts.js:178— hydrateMedia has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 4 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 220, fail, startTicketLeg, …). 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.
buildChainMemberRow (cognitive 20) src/main/resources/web/js/taskList.js:760— buildChainMemberRow has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (6 pts), if/else 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
buildFollowerBlock (cognitive 20) src/main/resources/web/js/modelPanel.js:485— buildFollowerBlock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 belong 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.
WebSocketRoutes.nfTicketRoutes (cognitive 19) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5896— WebSocketRoutes.nfTicketRoutes has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 2 (3 pts) (nesting depth added 12). 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.
InteractionHub.handleAnswered (cognitive 19) src/main/scala/nebflow/agent/InteractionHub.scala:532— InteractionHub.handleAnswered has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubAgentStartupRecovery.markInterruptedRecords (cognitive 19) src/main/scala/nebflow/agent/SubAgentStartupRecovery.scala:270— SubAgentStartupRecovery.markInterruptedRecords has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (6 pts), match/switch 2 (5 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.
LogsCommand.drainStep (cognitive 19) src/main/scala/nebflow/cli/LogsCommand.scala:73— LogsCommand.drainStep has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 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.
UpdateRun.run (cognitive 19) src/main/scala/nebflow/cli/SystemCommands.scala:58— UpdateRun.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MemoryRecallDaemon.sessionsFingerprint (cognitive 19) src/main/scala/nebflow/core/MemoryRecallDaemon.scala:119— MemoryRecallDaemon.sessionsFingerprint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (7 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DaemonPanelSchema.readOptions (cognitive 19) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:568— DaemonPanelSchema.readOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (9 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DeviceDelegate.handleSpawn (cognitive 19) src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:368— DeviceDelegate.handleSpawn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 8). 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.
StdioTransport.startReaderThreads (cognitive 19) src/main/scala/nebflow/core/mcp/transports.scala:45— StdioTransport.startReaderThreads has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3, match/switch 1 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SecretsStore.writeThrough (cognitive 19) src/main/scala/nebflow/core/secrets/SecretsStore.scala:457— SecretsStore.writeThrough has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EditTool.applyEditToBuffer (cognitive 19) src/main/scala/nebflow/core/tools/EditTool.scala:199— EditTool.applyEditToBuffer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 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.
MailTool.deliverToDelegate (cognitive 19) src/main/scala/nebflow/core/tools/MailTool.scala:1230— MailTool.deliverToDelegate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (8 pts) (nesting depth added 10). 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.
NodeCancelTool.call (cognitive 19) src/main/scala/nebflow/core/tools/NodeCancelTool.scala:55— NodeCancelTool.call has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 2 (5 pts) (nesting depth added 12). 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.
NodeReportToolDef.call (cognitive 19) src/main/scala/nebflow/core/tools/NodeReportTool.scala:218— NodeReportToolDef.call has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 6 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RemoteExecutor.executeViaBestPath (cognitive 19) src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1387— RemoteExecutor.executeViaBestPath has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
StringMatcher.closestLineHint (cognitive 19) src/main/scala/nebflow/core/tools/StringMatcher.scala:154— StringMatcher.closestLineHint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskListStore.logSync (cognitive 19) src/main/scala/nebflow/core/tools/TaskListTool.scala:797— TaskListStore.logSync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (9 pts), 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.
WebSearchTool.call (cognitive 19) src/main/scala/nebflow/core/tools/WebSearchTool.scala:537— WebSearchTool.call has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WriteTool.runWrite (cognitive 19) src/main/scala/nebflow/core/tools/WriteTool.scala:106— WriteTool.runWrite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiService.paragraph (cognitive 19) src/main/scala/nebflow/core/wiki/WikiService.scala:777— WikiService.paragraph has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 4, boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DropboxService.sendText (cognitive 19) src/main/scala/nebflow/dropbox/DropboxService.scala:327— DropboxService.sendText has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (4 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NeblinkService.applyServerPeerStatus (cognitive 19) src/main/scala/nebflow/neblink/NeblinkService.scala:400— NeblinkService.applyServerPeerStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), match/switch 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.
SocialChannels.save (cognitive 19) src/main/scala/nebflow/social/SocialChannels.scala:476— SocialChannels.save has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WeixinBindAutoWire.provisionLeg (cognitive 19) src/main/scala/nebflow/social/WeixinBindAutoWire.scala:311— WeixinBindAutoWire.provisionLeg has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 4 (9 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
wiki-graph-redesign-sample.html.layout (cognitive 19) docs/design/wiki-graph-redesign-sample.html:282— wiki-graph-redesign-sample.html.layout has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (8 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.settleClose (cognitive 19) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:1237— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.settleClose has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-shots.boot (cognitive 19) reports/20261027_220000_mobile-canvas-ux/audit-shots.mjs:16— audit-shots.boot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 21, 39, 48). 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.
markdown.applyJumpAnchor (cognitive 19) src/main/resources/web/js/viewers/markdown.js:156— markdown.applyJumpAnchor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7 (nesting depth added 4). Of this number, 11 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localStore.warmMirror (cognitive 19) src/main/resources/web/js/localStore.js:577— localStore.warmMirror has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, loops 5, if/else 4, error handling 1. Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (run, a function literal at line 582, a function literal at line 605). 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.
orbPresets.boardOf (cognitive 19) src/main/resources/web/js/orbPresets.js:141— orbPresets.boardOf has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (6 pts), if/else 3 (4 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.
askAttachments.mountAnswerAttachments (cognitive 19) src/main/resources/web/js/askAttachments.js:315— askAttachments.mountAnswerAttachments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 6, ternaries 1. Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 416, 400, 407, …). 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.
chat.closeAskUserCard (cognitive 19) src/main/resources/web/js/chat.js:3215— chat.closeAskUserCard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reference.refMentionText (cognitive 19) src/main/resources/web/js/reference.js:218— reference.refMentionText has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2 (5 pts) (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.
flowViewers.openNodeResultViewer (cognitive 19) src/main/resources/web/js/flowViewers.js:84— flowViewers.openNodeResultViewer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 4, if/else 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flowViewers.openRules (cognitive 19) src/main/resources/web/js/flowViewers.js:152— flowViewers.openRules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 7). 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 169, 177). 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.
fmNodeCard.chainCardHtml (cognitive 19) src/main/resources/web/js/fmNodeCard.js:210— fmNodeCard.chainCardHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 7 (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.
flowAnim.reconcile (cognitive 19) src/main/resources/web/js/flowAnim.js:212— flowAnim.reconcile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 217). 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.
canvas.initCardHeadGestures::finish (cognitive 19) src/main/resources/web/js/canvas.js:3372— canvas.initCardHeadGestures::finish has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6 (7 pts), boolean chains 4 (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.
chainDetailEntry.attachChainDetailLayer (cognitive 19) src/main/resources/web/js/chainDetailEntry.js:50— chainDetailEntry.attachChainDetailLayer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 2 (3 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 16 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.
scheduled-task.initScheduledTask (cognitive 19) src/main/resources/web/js/scheduled-task.js:634— scheduled-task.initScheduledTask has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 660, 647, 668). 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.
socialPanel.seedPanelCache (cognitive 19) src/main/resources/web/js/socialPanel.js:334— socialPanel.seedPanelCache has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 19) src/main/resources/web/js/main.js:3637— (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 3 (5 pts) (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.
flushOfflineQueue (cognitive 19) src/main/resources/web/js/input.js:1001— flushOfflineQueue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 1002, 1010). 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.
restoreFromBackendHistory (cognitive 19) src/main/resources/web/js/persistence.js:1473— restoreFromBackendHistory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: 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.
normalizeMessage (cognitive 19) src/main/resources/web/js/chatSearch.js:907— normalizeMessage has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, ternaries 3 (6 pts), if/else 1, match/switch 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
start (cognitive 19) src/main/resources/web/js/micOrb.js:1016— start has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 7, boolean chains 3, loops 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1024, (anonymous)::loop, a function literal at line 1027, …). 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.
renderInto (cognitive 19) src/main/resources/web/js/wikiGraph.js:224— renderInto has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
showEdgeTip (cognitive 19) src/main/resources/web/js/wikiGraph.js:1445— showEdgeTip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (2 pts), other 1 (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.
initContacts (cognitive 19) src/main/resources/web/js/contacts.js:1200— initContacts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 1283, a function literal at line 1234, dismissSearchCard, …). 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.
applyReceipt (cognitive 19) src/main/resources/web/js/sendState.js:173— applyReceipt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 3 (4 pts) (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.
anchorSendToRealId (cognitive 19) src/main/resources/web/js/sendState.js:288— anchorSendToRealId has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (3 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.
SecretsStore.referencedByAll (cognitive 18) src/main/scala/nebflow/core/secrets/SecretsStore.scala:370— SecretsStore.referencedByAll has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AgentControlTool.kindRejection (cognitive 18) src/main/scala/nebflow/core/tools/AgentControlTool.scala:151— AgentControlTool.kindRejection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 4). 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.
AgentFlowTool.call (cognitive 18) src/main/scala/nebflow/core/tools/AgentFlowTool.scala:164— AgentFlowTool.call has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (11 pts), if/else 5 (7 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AskUserQuestionTool.formatSecretReceipt (cognitive 18) src/main/scala/nebflow/core/tools/AskUserQuestionTool.scala:616— AskUserQuestionTool.formatSecretReceipt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileRefs.embedImage (cognitive 18) src/main/scala/nebflow/core/tools/FileRefs.scala:1020— FileRefs.embedImage has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 5 (7 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LoadTool.validateAndMount (cognitive 18) src/main/scala/nebflow/core/tools/LoadTool.scala:116— LoadTool.validateAndMount has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TargetDirGuard.resolve (cognitive 18) src/main/scala/nebflow/dropbox/TargetDirGuard.scala:151— TargetDirGuard.resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (3 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.
NfFileRoutes.nfTicketRoutes (cognitive 18) src/main/scala/nebflow/gateway/NfFileRoutes.scala:355— NfFileRoutes.nfTicketRoutes has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (18 pts) (nesting depth added 12). 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.
StaticRoutes.uploadsServe (cognitive 18) src/main/scala/nebflow/gateway/StaticRoutes.scala:608— StaticRoutes.uploadsServe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 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.
AgentSessionSync.pushTask (cognitive 18) src/main/scala/nebflow/neblink/AgentSessionSync.scala:284— AgentSessionSync.pushTask has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 3 (8 pts), if/else 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.
NeblinkRelayTunnel.handleRelayRequestLive (cognitive 18) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:913— NeblinkRelayTunnel.handleRelayRequestLive has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 2 (3 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConfigService.rewriteAgentJson (cognitive 18) src/main/scala/nebflow/service/ConfigService.scala:811— ConfigService.rewriteAgentJson has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeishuCredentials.fromSocialChannelsSchema (cognitive 18) src/main/scala/nebflow/social/FeishuCredentials.scala:147— FeishuCredentials.fromSocialChannelsSchema has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 1 (5 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeixinIngressToken.ensure (cognitive 18) src/main/scala/nebflow/social/WeixinIngressToken.scala:76— WeixinIngressToken.ensure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_plugin.check_c4 (cognitive 18) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:890— validate_plugin.check_c4 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fileSearch.domSearch (cognitive 18) REDACTED:237— fileSearch.domSearch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (5 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 12 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.
localStore.importLegacyMessages (cognitive 18) src/main/resources/web/js/localStore.js:488— localStore.importLegacyMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3 (4 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.
chat.readJsonString (cognitive 18) src/main/resources/web/js/chat.js:1424— chat.readJsonString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reference.jumpRef (cognitive 18) src/main/resources/web/js/reference.js:753— reference.jumpRef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 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.
flowMapTab.bindCamera (cognitive 18) src/main/resources/web/js/flowMapTab.js:417— flowMapTab.bindCamera has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, error handling 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 439, a function literal at line 424, endDrag, …). 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.
flowMapTab.renderFlowMapDiff (cognitive 18) src/main/resources/web/js/flowMapTab.js:1738— flowMapTab.renderFlowMapDiff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 1 (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.
projectTab.renderProjectsInto (cognitive 18) src/main/resources/web/js/projectTab.js:704— projectTab.renderProjectsInto has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wikiGraph.openWikiGraphTab (cognitive 18) src/main/resources/web/js/wikiGraph.js:131— wikiGraph.openWikiGraphTab has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3 (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.
canvas.initCardWindowMode (cognitive 18) src/main/resources/web/js/canvas.js:4329— canvas.initCardWindowMode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
neblink.neblinkSettingsHTML (cognitive 18) src/main/resources/web/js/neblink.js:423— neblink.neblinkSettingsHTML has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 6, if/else 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachPreviewField.readInDialect (cognitive 18) src/main/resources/web/js/attachPreviewField.js:169— attachPreviewField.readInDialect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 3 (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.
attachUpload.uploadCardEl (cognitive 18) src/main/resources/web/js/attachUpload.js:205— attachUpload.uploadCardEl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
dropbox.mergeDeviceMessages (cognitive 18) src/main/resources/web/js/dropbox.js:838— dropbox.mergeDeviceMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.makeLocalThumbFrame (cognitive 18) REDACTED:2449— messages.makeLocalThumbFrame has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 2, ternaries 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 3 belong to 2 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.
messages.fetchQuoteTarget (cognitive 18) REDACTED:3706— messages.fetchQuoteTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chatSearch.buildModel (cognitive 18) src/main/resources/web/js/chatSearch.js:1367— chatSearch.buildModel has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (8 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
perception.renderSnapshotFace (cognitive 18) src/main/resources/web/js/perception.js:597— perception.renderSnapshotFace has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 658, a function literal at line 640, a function literal at line 668, …). 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.
normalizeSvgDataUri (cognitive 18) src/main/resources/web/js/chat.js:2111— normalizeSvgDataUri has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts), other 1 (nesting depth added 3). 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.
renderAttachmentPreview (cognitive 18) src/main/resources/web/js/chat.js:3618— renderAttachmentPreview has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 3632, (anonymous)::remove, (anonymous)::onerror, …). 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.
openPillListbox (cognitive 18) src/main/resources/web/js/chatSearch.js:562— openPillListbox has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 2 (4 pts), if/else 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.
openLocalStore (cognitive 18) src/main/resources/web/js/localStore.js:382— openLocalStore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 398). 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.
fillSnapshot (cognitive 18) src/main/resources/web/js/perception.js:686— fillSnapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to 2 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.
buildFriendPicker (cognitive 18) src/main/resources/web/js/friendGroups.js:309— buildFriendPicker has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (4 pts), ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 316, 337, 318, …). 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.
openPicker (cognitive 18) src/main/resources/web/js/workspacePicker.js:144— openPicker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 41 (49 pts), boolean chains 26, ternaries 14 (19 pts), other 3, loops 1 (nesting depth added 13). 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.
RestApiRoutes.buildMountedTeamsJson (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3647— RestApiRoutes.buildMountedTeamsJson has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2 (4 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RestApiRoutes.probeModelList (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3991— RestApiRoutes.probeModelList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RestApiRoutes.beginPkceLogin (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4208— RestApiRoutes.beginPkceLogin has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts), match/switch 1 (nesting depth added 10). 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.
ChatSend.run (cognitive 17) src/main/scala/nebflow/cli/ChatCommands.scala:58— ChatSend.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (7 pts), match/switch 1 (nesting depth added 10). 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.
SessionStore.findSessionByName (cognitive 17) src/main/scala/nebflow/core/SessionStore.scala:834— SessionStore.findSessionByName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DaemonPanelSchema.findEndTag (cognitive 17) src/main/scala/nebflow/core/daemon/DaemonPanelSchema.scala:330— DaemonPanelSchema.findEndTag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeviceDelegate.dispatch (cognitive 17) src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:147— DeviceDelegate.dispatch has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (7 pts), loops 3 (6 pts), if/else 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeviceDelegate.handleResult (cognitive 17) src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:640— DeviceDelegate.handleResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 6). 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.
VerdictFamily.matchCase (cognitive 17) src/main/scala/nebflow/core/flow/FlowSemantics.scala:110— VerdictFamily.matchCase has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HooksConfigLoader.load (cognitive 17) src/main/scala/nebflow/core/hooks/HooksConfigLoader.scala:16— HooksConfigLoader.load has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (6 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HealthCheck.tierPortServing (cognitive 17) src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:342— HealthCheck.tierPortServing has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (6 pts), loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EmbeddingService.parseResponse (cognitive 17) src/main/scala/nebflow/core/index/EmbeddingService.scala:137— EmbeddingService.parseResponse has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (17 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PluginMcpManager.release (cognitive 17) src/main/scala/nebflow/core/plugin/PluginMcpManager.scala:128— PluginMcpManager.release has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), match/switch 2 (6 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemReminders.collectAllIO (cognitive 17) src/main/scala/nebflow/core/reminders.scala:101— SystemReminders.collectAllIO has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SandboxRuntime.init (cognitive 17) src/main/scala/nebflow/core/sandbox/SandboxBackend.scala:239— SandboxRuntime.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SeedService.reconcilePlugin (cognitive 17) src/main/scala/nebflow/core/seed/SeedService.scala:456— SeedService.reconcilePlugin has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 6 (8 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AgentControlTool.call (cognitive 17) src/main/scala/nebflow/core/tools/AgentControlTool.scala:282— AgentControlTool.call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ChainWriteTool.allocateForChain (cognitive 17) src/main/scala/nebflow/core/tools/ChainWriteTool.scala:584— ChainWriteTool.allocateForChain has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 4 (7 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EditTool.summarizeResult (cognitive 17) src/main/scala/nebflow/core/tools/EditTool.scala:84— EditTool.summarizeResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageInject.prepareImage (cognitive 17) src/main/scala/nebflow/core/tools/ImageInject.scala:76— ImageInject.prepareImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeTools.maybeRestoreChains (cognitive 17) src/main/scala/nebflow/core/tools/NodeTools.scala:1524— NodeTools.maybeRestoreChains has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (8 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SubTaskTool.spawnWorker (cognitive 17) src/main/scala/nebflow/core/tools/SubTaskTool.scala:242— SubTaskTool.spawnWorker has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TaskSearchTool.render (cognitive 17) src/main/scala/nebflow/core/tools/TaskSearchTool.scala:68— TaskSearchTool.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WriteTool.summarizeResult (cognitive 17) src/main/scala/nebflow/core/tools/WriteTool.scala:55— WriteTool.summarizeResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AskUserAttachmentRoutes.routes (cognitive 17) src/main/scala/nebflow/gateway/AskUserAttachmentRoutes.scala:196— AskUserAttachmentRoutes.routes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (8 pts) (nesting depth added 10). 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.
AskUserAttachmentRoutes.handleUpload (cognitive 17) src/main/scala/nebflow/gateway/AskUserAttachmentRoutes.scala:229— AskUserAttachmentRoutes.handleUpload has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 2 (5 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PatAuth.config (cognitive 17) src/main/scala/nebflow/gateway/PatAuth.scala:83— PatAuth.config has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 2, error handling 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PresenceRoutes.buildMountedTeamsJson (cognitive 17) src/main/scala/nebflow/gateway/PresenceRoutes.scala:2381— PresenceRoutes.buildMountedTeamsJson has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2 (4 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ProviderProbe.probeModelList (cognitive 17) src/main/scala/nebflow/gateway/ProviderProbe.scala:84— ProviderProbe.probeModelList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionRecorder.flushTextWithMeta (cognitive 17) src/main/scala/nebflow/gateway/SessionRecorder.scala:120— SessionRecorder.flushTextWithMeta has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
StaticRoutes.pluginAssetsServe (cognitive 17) src/main/scala/nebflow/gateway/StaticRoutes.scala:732— StaticRoutes.pluginAssetsServe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WsFileOpsHandlers.handleListDir (cognitive 17) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:59— WsFileOpsHandlers.handleListDir has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsFileOpsHandlers.handleDeletePaths (cognitive 17) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:1118— WsFileOpsHandlers.handleDeletePaths has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WsTasksWorkspaceHandlers.handleWsBrowseList (cognitive 17) src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:178— WsTasksWorkspaceHandlers.handleWsBrowseList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (6 pts) (nesting depth added 10). 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.
PortalTunnelBridge.feedBodyFrame (cognitive 17) src/main/scala/nebflow/neblink/PortalTunnelBridge.scala:351— PortalTunnelBridge.feedBodyFrame has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (8 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PerceptionCore.entriesPayload (cognitive 17) src/main/scala/nebflow/perception/PerceptionService.scala:642— PerceptionCore.entriesPayload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), match/switch 1 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeviceMail.parse (cognitive 17) src/main/scala/nebflow/shared/DeviceMail.scala:192— DeviceMail.parse has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 3 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FeishuBridgePlugin.matchTextAnswer (cognitive 17) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:356— FeishuBridgePlugin.matchTextAnswer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 5). 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.
FeishuBridgePlugin.onAgentEvent (cognitive 17) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:689— FeishuBridgePlugin.onAgentEvent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 4 (8 pts) (nesting depth added 6). 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.
FeishuCredentials.aclReading (cognitive 17) src/main/scala/nebflow/social/FeishuCredentials.scala:272— FeishuCredentials.aclReading has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 6 (8 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.
OutboundText.bareUnderscores (cognitive 17) src/main/scala/nebflow/social/outbound/OutboundText.scala:279— OutboundText.bareUnderscores has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_plugin.discover_official (cognitive 17) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:215— validate_plugin.discover_official has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_wiki_docs.parse_frontmatter (cognitive 17) src/main/resources/seed/plugins/visual-report/skills/wiki-docs/scripts/check_wiki_docs.py:94— check_wiki_docs.parse_frontmatter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
boot-harness.ws.on("message") (cognitive 17) evidence/20261019_210000_mobile-quickwins/harness/boot-harness.mjs:36— boot-harness.ws.on("message") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 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.
shoot.seedRegistry (cognitive 17) evidence/20261020_033000_plugin-panel/shoot.mjs:39— shoot.seedRegistry has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") (cognitive 17) reports/20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html:1218— 20261019_230310_canvas-card-stack-mockup-v3__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") (cognitive 17) reports/20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html:1228— 20261020_024534_canvas-card-stack-mockup-v4__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") (cognitive 17) reports/20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html:1408— 20261020_081631_canvas-card-stack-mockup-v5__delegate-nebflow-19bc02b5.html.ctxMenu.addEventListener("click") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lib.closeSession (cognitive 17) REDACTED:258— lib.closeSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (5 pts), ternaries 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.
localStore.importLegacyDeviceMessages (cognitive 17) src/main/resources/web/js/localStore.js:518— localStore.importLegacyDeviceMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
explorer.updatePickupProgress (cognitive 17) src/main/resources/web/js/explorer.js:1028— explorer.updatePickupProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
html.bindRefGlobalListeners (cognitive 17) REDACTED:290— html.bindRefGlobalListeners has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 293, 304, 308, …). 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.
docx.viewDocx (cognitive 17) src/main/resources/web/js/viewers/docx.js:17— docx.viewDocx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 13 points are the body's own statements and 4 belong to 2 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.
chat.readJsonArrayProgress (cognitive 17) src/main/resources/web/js/chat.js:1476— chat.readJsonArrayProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), boolean chains 3, 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.
reference.pageBadge (cognitive 17) src/main/resources/web/js/reference.js:78— reference.pageBadge has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 5 (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.
reference.chipTitle (cognitive 17) src/main/resources/web/js/reference.js:456— reference.chipTitle has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 2 (4 pts) (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.
delegateChainView.cardBadgesHtml (cognitive 17) src/main/resources/web/js/delegateChainView.js:55— delegateChainView.cardBadgesHtml has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 pts), if/else 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, 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.
wikiGraph.tick (cognitive 17) src/main/resources/web/js/wikiGraph.js:922— wikiGraph.tick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.appendMessages (cognitive 17) REDACTED:3097— messages.appendMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages.forwardSelectedTo (cognitive 17) REDACTED:3938— messages.forwardSelectedTo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 1 (2 pts), loops 2, ternaries 2, boolean chains 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.
messages.indexReceiptRows (cognitive 17) REDACTED:6053— messages.indexReceiptRows has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
bgTaskOutputPopup.fetchRemoteFinal (cognitive 17) src/main/resources/web/js/bgTaskOutputPopup.js:598— bgTaskOutputPopup.fetchRemoteFinal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
main.armQueueReconcileNet (cognitive 17) src/main/resources/web/js/main.js:691— main.armQueueReconcileNet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. Of this number, 12 points are the body's own statements and 5 belong 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.
memoryFace.parseSections (cognitive 17) src/main/resources/web/js/mobile/memoryFace.js:33— memoryFace.parseSections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 17) src/main/resources/web/js/main.js:1077— (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 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.
scheduleRemoteTerminalCleanup (cognitive 17) src/main/resources/web/js/main.js:4689— scheduleRemoteTerminalCleanup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
activeTombstoneIdsFrom (cognitive 17) src/main/resources/web/js/canvas.js:4413— activeTombstoneIdsFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (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.
showPresetModal (cognitive 17) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1163— showPresetModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1207, a function literal at line 1205, close). 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.
applyMeasuredLayout (cognitive 17) src/main/resources/web/js/flowMapTab.js:1818— applyMeasuredLayout has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cardHint (cognitive 17) src/main/resources/web/js/socialPanel.js:735— cardHint has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), ternaries 1 (3 pts), other 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
refreshCard (cognitive 17) src/main/resources/web/js/socialPanel.js:1123— refreshCard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 2). Of this number, 11 points are the body's own statements and 6 belong to 2 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.
emergencyCacheCleanup (cognitive 17) src/main/resources/web/js/persistence.js:80— emergencyCacheCleanup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
renderCalendar (cognitive 17) src/main/resources/web/js/chatSearch.js:480— renderCalendar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5 (6 pts), boolean chains 2, loops 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to 11 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.
bindChatEvents (cognitive 17) src/main/resources/web/js/dropbox.js:425— bindChatEvents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 8 function items inside it that branch (syncSendState, sendText, a function literal at line 463, …). 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.
bgRemoteRowHtml (cognitive 17) src/main/resources/web/js/main/bgAgents.js:288— bgRemoteRowHtml has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 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.
showReceipt (cognitive 17) src/main/resources/web/js/perception.js:710— showReceipt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 4 (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.
activateNav (cognitive 17) src/main/resources/web/js/mobile/navController.js:881— activateNav has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 5, error handling 2 (4 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (teardownNav, stack, top). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
channelProblem (cognitive 17) REDACTED:361— channelProblem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2, other 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncToActiveTab (cognitive 17) src/main/resources/web/js/askDock.js:185— syncToActiveTab has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketRoutes.nfFileVerdict (cognitive 16) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5678— WebSocketRoutes.nfFileVerdict has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 4 (5 pts), error handling 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.
SharedResources.spawnAgentActor (cognitive 16) src/main/scala/nebflow/agent/SharedResources.scala:276— SharedResources.spawnAgentActor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 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.
CliRouter.printCommandHelp (cognitive 16) src/main/scala/nebflow/cli/CliRouter.scala:373— CliRouter.printCommandHelp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileChangeLedger.coalesce (cognitive 16) src/main/scala/nebflow/core/FileChangeLedger.scala:178— FileChangeLedger.coalesce has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionStore.deleteLastUserMessage (cognitive 16) src/main/scala/nebflow/core/SessionStore.scala:1830— SessionStore.deleteLastUserMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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.
WsTimeoutFilter.decide (cognitive 16) src/main/scala/nebflow/core/WsTimeoutFilter.scala:35— WsTimeoutFilter.decide has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 1 (3 pts), boolean chains 2 (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.
DelegateRegistry.updateReport (cognitive 16) src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:208— DelegateRegistry.updateReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 1 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergeQueue.baseReady (cognitive 16) src/main/scala/nebflow/core/delegate/MergeQueue.scala:599— MergeQueue.baseReady has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 6). 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.
AgentIdentityStore.rewriteSoulSection (cognitive 16) src/main/scala/nebflow/core/entity/AgentIdentityStore.scala:260— AgentIdentityStore.rewriteSoulSection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalSessionRunner.emitFrame (cognitive 16) src/main/scala/nebflow/core/executor/ExternalSessionRunner.scala:827— ExternalSessionRunner.emitFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FileChangeTracker.create (cognitive 16) src/main/scala/nebflow/core/filewatch.scala:232— FileChangeTracker.create has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AskUserSecretSink.consumeEphemeral (cognitive 16) src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:323— AskUserSecretSink.consumeEphemeral has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (7 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.
BrowseGetCursor.applyChunk (cognitive 16) src/main/scala/nebflow/core/tools/BrowseGetCursor.scala:146— BrowseGetCursor.applyChunk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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.
DelegateTool.resolveWorkspace (cognitive 16) src/main/scala/nebflow/core/tools/DelegateTool.scala:241— DelegateTool.resolveWorkspace has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MailTool.validateChainId (cognitive 16) src/main/scala/nebflow/core/tools/MailTool.scala:977— MailTool.validateChainId has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (6 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MultiEditTool.summarizeResult (cognitive 16) src/main/scala/nebflow/core/tools/MultiEditTool.scala:91— MultiEditTool.summarizeResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiEditTool.call (cognitive 16) src/main/scala/nebflow/core/tools/MultiEditTool.scala:165— MultiEditTool.call has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 3 (4 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReadTool.streamWindow (cognitive 16) src/main/scala/nebflow/core/tools/ReadTool.scala:251— ReadTool.streamWindow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScheduleTool.summarizeResult (cognitive 16) src/main/scala/nebflow/core/tools/ScheduleTool.scala:157— ScheduleTool.summarizeResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TaskListHistory.rotateIfNeeded (cognitive 16) src/main/scala/nebflow/core/tools/TaskListHistory.scala:161— TaskListHistory.rotateIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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.
WikiIndex.frontmatterOf (cognitive 16) src/main/scala/nebflow/core/wiki/WikiIndex.scala:118— WikiIndex.frontmatterOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsoleAssetBatchRoutes.readCapped (cognitive 16) src/main/scala/nebflow/gateway/ConsoleAssetBatchRoutes.scala:103— ConsoleAssetBatchRoutes.readCapped has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnGuard.observeTunnelRequest (cognitive 16) src/main/scala/nebflow/gateway/connguard.scala:464— ConnGuard.observeTunnelRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 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.
NeblinkService.handleAnnounce (cognitive 16) src/main/scala/nebflow/neblink/NeblinkService.scala:361— NeblinkService.handleAnnounce has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PerceptionCore.saveDraft (cognitive 16) src/main/scala/nebflow/perception/PerceptionService.scala:734— PerceptionCore.saveDraft has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), match/switch 2 (5 pts), error handling 1 (4 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.
ConfigService.validateImagegenSection (cognitive 16) src/main/scala/nebflow/service/ConfigService.scala:513— ConfigService.validateImagegenSection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConfigService.scrubAgentJson (cognitive 16) src/main/scala/nebflow/service/ConfigService.scala:673— ConfigService.scrubAgentJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FeishuBridgePlugin.answerFromFrame (cognitive 16) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:1051— FeishuBridgePlugin.answerFromFrame has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WeixinIlinkBridgePlugin.mediaFailureNotice (cognitive 16) src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:540— WeixinIlinkBridgePlugin.mediaFailureNotice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodePlaywright.shot (cognitive 16) src/main/scala/nebflow/social/outbound/WebPageShot.scala:90— NodePlaywright.shot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (5 pts), error handling 1 (2 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
validate_plugin.check_c9 (cognitive 16) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:472— validate_plugin.check_c9 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_plugin.check_c15 (cognitive 16) src/main/resources/seed/plugins/nebflow-plugin-creator/skills/plugin-packaging/scripts/validate_plugin.py:729— validate_plugin.check_c15 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sidebar.getFolderStatusClass (cognitive 16) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3199— sidebar.getFolderStatusClass has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 4 (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.
utils.localizeToolSummary (cognitive 16) src/main/resources/web/js/utils.js:730— utils.localizeToolSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nfFileCache.nfCacheReconcile (cognitive 16) src/main/resources/web/js/nfFileCache.js:400— nfFileCache.nfCacheReconcile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
askPending.applyPendingAskSnapshot (cognitive 16) src/main/resources/web/js/askPending.js:132— askPending.applyPendingAskSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3, ternaries 2 (3 pts), boolean chains 2 (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.
persistence.askUserAnswerText (cognitive 16) src/main/resources/web/js/persistence.js:383— persistence.askUserAnswerText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
input.materializeOfflineBubbles (cognitive 16) src/main/resources/web/js/input.js:978— input.materializeOfflineBubbles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LargeTextView.drawRows (cognitive 16) src/main/resources/web/js/viewers/largeText.js:549— LargeTextView.drawRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agentFileViewer.openAgentFile (cognitive 16) src/main/resources/web/js/agentFileViewer.js:10— agentFileViewer.openAgentFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 31, 38). 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.
flowMapArchive.bindLayerEvents (cognitive 16) src/main/resources/web/js/flowMapArchive.js:1333— flowMapArchive.bindLayerEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1355, 1371, 1344, …). 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.
wikiGraph.(window).__wikiGraphProbe (cognitive 16) src/main/resources/web/js/wikiGraph.js:1717— wikiGraph.(window).__wikiGraphProbe has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 5 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
canvas.persistTabs (cognitive 16) src/main/resources/web/js/canvas.js:4466— canvas.persistTabs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shared.addSourceToggle (cognitive 16) src/main/resources/web/js/viewers/shared.js:625— shared.addSourceToggle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 637, 681). 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.
modelThinkingSelect.modelThinkingSelectHTML (cognitive 16) src/main/resources/web/js/sidebar/modelThinkingSelect.js:80— modelThinkingSelect.modelThinkingSelectHTML has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 5 (nesting depth added 2). 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: 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.
friendGroups.groupAvatarGrid (cognitive 16) src/main/resources/web/js/friendGroups.js:242— friendGroups.groupAvatarGrid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
friendGroups.openCreateGroupDialog (cognitive 16) src/main/resources/web/js/friendGroups.js:377— friendGroups.openCreateGroupDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 451, a function literal at line 397, a function literal at line 416, …). 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.
messages.onDeviceTransferEvent (cognitive 16) REDACTED:5264— messages.onDeviceTransferEvent has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 3 (4 pts), if/else 1, match/switch 1 (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.
errorRecovery.lastUserMessageText (cognitive 16) src/main/resources/web/js/errorRecovery.js:152— errorRecovery.lastUserMessageText has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), loops 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
colResizer.bindResizer (cognitive 16) src/main/resources/web/js/colResizer.js:159— colResizer.bindResizer has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 191, 160, 221). 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.
flowAgentPopup.resolveFlowNodeSession (cognitive 16) src/main/resources/web/js/flowAgentPopup.js:371— flowAgentPopup.resolveFlowNodeSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scheduled-task.buildInlineCreate (cognitive 16) src/main/resources/web/js/scheduled-task.js:301— scheduled-task.buildInlineCreate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 355, 339, 343). 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.
perception.routePerceptionFrame (cognitive 16) src/main/resources/web/js/perception.js:126— perception.routePerceptionFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
freeze.freezeWindowState (cognitive 16) src/main/resources/web/js/main/freeze.js:14— freeze.freezeWindowState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncQuoteStates (cognitive 16) REDACTED:3631— syncQuoteStates has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
refreshFileTab (cognitive 16) src/main/resources/web/js/canvas.js:896— refreshFileTab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 4, error handling 2, ternaries 1. Of this number, 12 points are the body's own statements and 4 belong to 5 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.
deckLiveBind (cognitive 16) src/main/resources/web/js/canvas.js:2364— deckLiveBind has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (onScroll, a function literal at line 2366). 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.
showFolderCtxMenu (cognitive 16) REDACTED:3246— showFolderCtxMenu has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 3. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 3282, a function literal at line 3274, a function literal at line 3342, …). 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.
renderFlowMapInto (cognitive 16) src/main/resources/web/js/flowMapTab.js:2111— renderFlowMapInto has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2127, 2141). 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.
syncSwitchbar (cognitive 16) src/main/resources/web/js/mobile/navController.js:555— syncSwitchbar has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loadIndex (cognitive 16) src/main/resources/web/js/nfFileCache.js:110— loadIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (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.
onMicChunk (cognitive 16) src/main/resources/web/js/voiceEngine.js:239— onMicChunk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
syncSeat (cognitive 16) src/main/resources/web/js/askDock.js:223— syncSeat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 10 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.
jumpToAsk (cognitive 16) src/main/resources/web/js/askPending.js:322— jumpToAsk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, error handling 1 (2 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (locate, settle, a function literal at line 340, …). 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.
ClassTooLong: LargeTextView src/main/resources/web/js/viewers/largeText.js:116— ClassTooLong — 439 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 39 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Near-duplicate member pair (519 shared lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:379— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:379-1168 | src/main/scala/nebflow/llm/interface.scala:413-1250 — These two members are variants of one another: 519 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (480 shared lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2586-3456 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:206-2352 — These two members are variants of one another: 480 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (272 shared lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4796— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4796-5135 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2720-3088 — These two members are variants of one another: 272 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (173 shared lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4381— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4381-4567 | src/main/scala/nebflow/gateway/AuthRoutes.scala:276-483 — These two members are variants of one another: 173 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (103 shared lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:143— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:143-265 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:182-304 — These two members are variants of one another: 103 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (76 shared lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:505— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:505-602 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:522-653 — These two members are variants of one another: 76 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (26 shared lines) src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:281— src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:281-391 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:572-688 — These two members are variants of one another: 26 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) src/main/scala/nebflow/core/tools/BashTool.scala:1100— src/main/scala/nebflow/core/tools/BashTool.scala:1100-1257 | src/main/scala/nebflow/core/tools/BashTool.scala:1305-1333 | src/main/scala/nebflow/core/tools/BashTool.scala:1364-1400 | src/main/scala/nebflow/core/tools/GenerateImageTool.scala:149-162 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:972-999 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1012-1029 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1041-1057 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (107 corresponding lines) · ×1
Edited copy of a member (107 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:114— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:114-220 | src/main/scala/nebflow/llm/fallback.scala:246-363 — These two members are one piece of code written twice and then edited apart: 107 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 (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:839— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:839-913 | src/main/scala/nebflow/core/LlmLogWriter.scala:955-1032 — These two members are one piece of code written twice and then edited apart: 75 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 (74 corresponding lines) · ×1
Edited copy of a member (74 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:251— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:251-324 | src/main/scala/nebflow/llm/fallback.scala:394-468 — These two members are one piece of code written twice and then edited apart: 74 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 (94 corresponding lines) · ×1
Edited copy of a member (94 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:349— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:349-442 | src/main/scala/nebflow/neblink/NeblinkClient.scala:394-501 — These two members are one piece of code written twice and then edited apart: 94 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 (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:442— src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:442-494 | src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:537-591 — These two members are one piece of code written twice and then edited apart: 53 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 (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:690— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:690-747 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1107-1160 — These two members are one piece of code written twice and then edited apart: 54 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) src/main/scala/nebflow/core/tools/EditTool.scala:136— src/main/scala/nebflow/core/tools/EditTool.scala:136-182 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:166-209 — These two members are one piece of code written twice and then edited apart: 44 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) src/main/scala/nebflow/core/tools/TaskBoardTool.scala:341— src/main/scala/nebflow/core/tools/TaskBoardTool.scala:341-395 | src/main/scala/nebflow/core/tools/TaskTool.scala:259-304 — These two members are one piece of code written twice and then edited apart: 46 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 (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4259— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4259-4325 | src/main/scala/nebflow/gateway/AuthRoutes.scala:146-215 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5977— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5977-6004 | src/main/scala/nebflow/gateway/FsOps.scala:58-86 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) src/main/scala/nebflow/social/FeishuChannel.scala:428— src/main/scala/nebflow/social/FeishuChannel.scala:428-469 | src/main/scala/nebflow/social/FeishuChannel.scala:651-691 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1045— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1045-1078 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1613-1648 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1689— src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1689-1704 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1733-1748 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1766-1780 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1794-1811 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1827-1843 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:168— src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:168-199 | src/main/scala/nebflow/core/secrets/SecretsStore.scala:458-512 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1042— src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1042-1081 | src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1108-1140 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/main/scala/nebflow/core/tools/LoadTool.scala:73— src/main/scala/nebflow/core/tools/LoadTool.scala:73-99 | src/main/scala/nebflow/core/tools/LoadTool.scala:151-177 — These two members are one piece of code written twice and then edited apart: 27 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, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) src/main/scala/nebflow/core/tools/AskTools.scala:170— src/main/scala/nebflow/core/tools/AskTools.scala:170-194 | src/main/scala/nebflow/core/tools/DelegateReportTool.scala:54-72 | src/main/scala/nebflow/core/tools/NodeReportTool.scala:176-208 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) src/main/scala/nebflow/core/delegate/MergeArtifactCare.scala:93— src/main/scala/nebflow/core/delegate/MergeArtifactCare.scala:93-96 | src/main/scala/nebflow/core/delegate/MergeArtifactCare.scala:100-104 | src/main/scala/nebflow/core/delegate/MergeArtifactCare.scala:108-112 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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 (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) src/main/scala/nebflow/cli/ChatCommands.scala:168— src/main/scala/nebflow/cli/ChatCommands.scala:168-183 | src/main/scala/nebflow/cli/SessionCommand.scala:94-107 | src/main/scala/nebflow/cli/SessionCommand.scala:121-136 | src/main/scala/nebflow/cli/SessionCommand.scala:150-165 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) src/main/scala/nebflow/core/delegate/DualMode.scala:45— src/main/scala/nebflow/core/delegate/DualMode.scala:45-54 | src/main/scala/nebflow/core/delegate/DualMode.scala:57-66 | src/main/scala/nebflow/core/plugin/PluginsConfig.scala:36-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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 (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:240— src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:240-253 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:279-292 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:324-336 | src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:344-357 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×1
Edited copies of one member (5 members, 9+ corresponding lines) src/main/scala/nebflow/cli/GatewayClient.scala:20— src/main/scala/nebflow/cli/GatewayClient.scala:20-28 | src/main/scala/nebflow/cli/GatewayClient.scala:31-41 | src/main/scala/nebflow/cli/GatewayClient.scala:44-52 | src/main/scala/nebflow/cli/GatewayClient.scala:55-65 | src/main/scala/nebflow/cli/GatewayClient.scala:68-78 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×1
Edited copies of one member (3 members, 2+ corresponding lines) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:315— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:315-316 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1197-1198 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:323-324 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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 (4 members, 4+ corresponding lines) · ×1
Edited copies of one member (4 members, 4+ corresponding lines) src/main/scala/nebflow/cli/ChatCommands.scala:115— src/main/scala/nebflow/cli/ChatCommands.scala:115-122 | src/main/scala/nebflow/cli/FolderCommand.scala:111-114 | src/main/scala/nebflow/cli/ModelCommand.scala:61-64 | src/main/scala/nebflow/cli/SessionCommand.scala:115-118 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 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.
Duplicated block (108–109 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:597— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:597-704 | src/main/scala/nebflow/llm/interface.scala:674-782 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:597` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:592` calls `eval`, `ref` and `src/main/scala/nebflow/llm/interface.scala:663` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (97–108 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3838— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3838-3934 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:507-614 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3838` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (88 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:300— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:300-387 | src/main/scala/nebflow/core/LlmLogWriter.scala:320-407 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (62–88 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1037— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1037-1098 | src/main/scala/nebflow/llm/interface.scala:1079-1166 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1037` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (68–86 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2285— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2285-2352 | src/main/scala/nebflow/gateway/SocialRoutes.scala:909-994 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2285` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (78–79 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1722— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1722-1799 | src/main/scala/nebflow/gateway/SocialRoutes.scala:228-306 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1722` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (139 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3317— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3317-3455 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:2083-2221 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3317` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (69 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:134— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:134-202 | src/main/scala/nebflow/core/LlmLogWriter.scala:152-220 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (67–68 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:523— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:523-589 | src/main/scala/nebflow/llm/interface.scala:595-662 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:523` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (66 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4668— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4668-4733 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2593-2658 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (62–66 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3182— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3182-3243 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:192-257 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (63–64 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2658— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2658-2721 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:551-613 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2658` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (104–109 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2061— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2061-2164 | src/main/scala/nebflow/gateway/SocialRoutes.scala:715-823 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2061` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (59–61 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1992— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1992-2050 | src/main/scala/nebflow/gateway/SocialRoutes.scala:543-603 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1992` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (61 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:251— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:251-311 | src/main/scala/nebflow/llm/fallback.scala:394-454 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala` and `src/main/scala/nebflow/llm/fallback.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:251` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (53–58 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4467— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4467-4519 | src/main/scala/nebflow/gateway/AuthRoutes.scala:370-427 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4467` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (131–133 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4259— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4259-4389 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1953-2085 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (2–57 lines × 5) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4933— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4933-4934 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4990-5038 | src/main/scala/nebflow/gateway/SessionRecorder.scala:56-57 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2865-2866 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2922-2978 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4990` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4990` calls `downField`, `getOrElse` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4933` 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 (93 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4796— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4796-4888 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2720-2812 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4796` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (54 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:349— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:349-402 | src/main/scala/nebflow/neblink/NeblinkClient.scala:394-447 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (50–53 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:91— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:91-140 | src/main/scala/nebflow/gateway/ExplorerWatchSession.scala:98-150 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` and `src/main/scala/nebflow/gateway/ExplorerWatchSession.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `NebflowLogger` names `nebflow.core.NebflowLogger` in one and `nebflow.shared.NebflowLogger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (94–99 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:228— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:228-321 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:28-126 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ConfigRoutes.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `PathUtil` names `nebflow.core.PathUtil` in one and `nebflow.shared.PathUtil` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (71–72 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:150— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:150-220 | src/main/scala/nebflow/llm/fallback.scala:292-363 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala` and `src/main/scala/nebflow/llm/fallback.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/fallback.scala:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34–50 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:711— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:711-744 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:107-156 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:711` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (45–48 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4027— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4027-4071 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:975-1022 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (48 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:240— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:240-287 | src/main/scala/nebflow/core/LlmLogWriter.scala:260-307 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (61–63 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2726— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2726-2786 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:738-800 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2726` 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 (77–84 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:796— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:796-872 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:250-333 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:796` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (49 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4116— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4116-4164 | src/main/scala/nebflow/gateway/WsDropboxHandlers.scala:82-130 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsDropboxHandlers.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (46 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4654— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4654-4699 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1553-1598 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (45–46 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3765— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3765-3810 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:420-464 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (45 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2810— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2810-2854 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:111-155 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (42 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:746— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:746-787 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:201-242 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (35–41 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1357— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1357-1391 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:449-489 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (41 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:449— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:449-489 | src/main/scala/nebflow/llm/interface.scala:523-563 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:449` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–39 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:432— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:432-465 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:271-309 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:316-319 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:432` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (69–77 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1801— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1801-1869 | src/main/scala/nebflow/gateway/SocialRoutes.scala:308-384 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1801` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (36–39 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:707— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:707-742 | src/main/scala/nebflow/llm/interface.scala:784-822 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:707` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (45–53 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2212— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2212-2256 | src/main/scala/nebflow/gateway/SocialRoutes.scala:826-878 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2212` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/SocialRoutes.scala:822` calls `conversationReceipts`, `flatMap` and `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2212` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (30–37 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:826— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:826-855 | src/main/scala/nebflow/llm/interface.scala:923-959 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:826` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2019— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2019-2056 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:522-559 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (36 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3648— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3648-3683 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:2382-2417 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3648` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (53–57 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:538— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:538-590 | src/main/scala/nebflow/gateway/RegistryRoutes.scala:27-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:538` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–32 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1276— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1276-1304 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1482-1513 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (32 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5158— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5158-5189 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3111-3142 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5198` calls `extractToken` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3157` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (28–32 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1099— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1099-1126 | src/main/scala/nebflow/llm/interface.scala:1175-1206 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:1099` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30–31 lines × 2) src/main/scala/nebflow/social/FeishuChannel.scala:439— src/main/scala/nebflow/social/FeishuChannel.scala:439-469 | src/main/scala/nebflow/social/FeishuChannel.scala:662-691 — 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 `src/main/scala/nebflow/social/FeishuChannel.scala:439` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2820— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2820-2832 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1097-1126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2820` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–29 lines × 2) src/main/scala/nebflow/core/tools/TaskBoardTool.scala:364— src/main/scala/nebflow/core/tools/TaskBoardTool.scala:364-392 | src/main/scala/nebflow/core/tools/TaskTool.scala:269-296 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/TaskBoardTool.scala:364` 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 (18–28 lines × 2) src/main/scala/nebflow/Main.scala:335— src/main/scala/nebflow/Main.scala:335-352 | src/main/scala/nebflow/Main.scala:364-391 — 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 (26–28 lines × 2) src/main/scala/nebflow/core/SchemePolicy.scala:141— src/main/scala/nebflow/core/SchemePolicy.scala:141-166 | src/main/scala/nebflow/core/presets/PresetStore.scala:333-360 — 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 (16–27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:327— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:327-353 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:132-147 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ConfigRoutes.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:327` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25–27 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3036— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3036-3060 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1511-1537 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:3036` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–27 lines × 2) src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1055— src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1055-1081 | src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1117-1140 — 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 `src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1055` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1519— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1519-1542 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1062-1086 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1519` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (40 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:446— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:446-485 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:459-498 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1501— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1501-1509 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:650-673 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (23–24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1528— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1528-1551 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:706-728 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1528` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (70–71 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:876— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:876-945 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:345-415 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:876` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–34 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1584— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1584-1612 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1130-1163 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1584` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1921— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1921-1936 | src/main/scala/nebflow/gateway/SocialRoutes.scala:443-466 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/SocialRoutes.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 659 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1921` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2976— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2976-2997 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1445-1468 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2976` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–24 lines × 2) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1290— src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1290-1301 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1349-1372 — 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 `src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1349` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–24 lines × 2) src/main/scala/nebflow/gateway/ChatRoutes.scala:74— src/main/scala/nebflow/gateway/ChatRoutes.scala:74-83 | src/main/scala/nebflow/gateway/ChatRoutes.scala:93-116 — 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 `src/main/scala/nebflow/gateway/ChatRoutes.scala:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–23 lines × 3) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1243— src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1243-1265 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1489-1505 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1617-1632 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1243` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22–23 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:943— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:943-964 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:1013-1035 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19–23 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1334— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1334-1352 | src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala:288-310 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsTasksWorkspaceHandlers.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17–22 lines × 3) src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1233— src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1233-1249 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1449-1466 | src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1603-1624 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/processor/TaskStuckWatcher.scala:1233` 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 (41–42 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:722— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:722-762 | src/main/scala/nebflow/neblink/NeblinkPresenceService.scala:776-817 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` and `src/main/scala/nebflow/neblink/NeblinkPresenceService.scala` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 417 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21–22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5978— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:5978-5998 | src/main/scala/nebflow/gateway/FsOps.scala:59-80 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/FsOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (16–22 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:151— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:151-166 | src/main/scala/nebflow/gateway/SessionRoutes.scala:26-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–22 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:746— src/main/scala/nebflow/agent/AgentFrozen.scala:746-767 | src/main/scala/nebflow/agent/AgentIdle.scala:650-667 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentFrozen.scala:746` 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 (19–21 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1477— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1477-1495 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:624-644 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:624` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (43 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4331— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:4331-4373 | src/main/scala/nebflow/gateway/AuthRoutes.scala:227-269 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/AuthRoutes.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 295 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–19 lines × 4) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:467— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:467-485 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:723-732 | src/main/scala/nebflow/llm/interface.scala:541-559 | src/main/scala/nebflow/llm/interface.scala:802-811 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17–19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1157— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1157-1173 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1341-1359 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–19 lines × 2) src/main/scala/nebflow/agent/AgentFrozen.scala:472— src/main/scala/nebflow/agent/AgentFrozen.scala:472-490 | src/main/scala/nebflow/agent/AgentProcessing.scala:1002-1015 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/agent/AgentFrozen.scala:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/scala/nebflow/agent/AgentFrozen.scala:492` calls `updateRegistryEscalation` and `src/main/scala/nebflow/agent/AgentProcessing.scala:1017` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–18 lines × 6) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2154— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2154-2171 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3388-3394 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3422-3428 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3437-3443 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3455-3461 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3618-3623 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–18 lines × 4) src/main/scala/nebflow/core/tools/AskTools.scala:173— src/main/scala/nebflow/core/tools/AskTools.scala:173-182 | src/main/scala/nebflow/core/tools/TaskBoardTool.scala:350-359 | src/main/scala/nebflow/core/tools/TaskBoardTool.scala:363-380 | src/main/scala/nebflow/core/tools/TaskTool.scala:268-285 — there are 4 copies across 3 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/AskTools.scala:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–25 lines × 2) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:873— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:873-894 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1032-1056 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14–18 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3962— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3962-3975 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:708-725 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (33 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:629— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:629-661 | src/main/scala/nebflow/core/LlmLogWriter.scala:727-759 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17–18 lines × 2) src/main/scala/nebflow/core/entity/EntityLoader.scala:314— src/main/scala/nebflow/core/entity/EntityLoader.scala:314-331 | src/main/scala/nebflow/core/entity/EntityLoader.scala:367-383 — 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 `src/main/scala/nebflow/core/entity/EntityLoader.scala:314` 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 (15–17 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:811— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:811-825 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1056-1070 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1623-1639 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:811` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1621` calls `serverConfigNode` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1054` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–17 lines × 3) src/main/scala/nebflow/core/tools/EditTool.scala:161— src/main/scala/nebflow/core/tools/EditTool.scala:161-171 | src/main/scala/nebflow/core/tools/MultiEditTool.scala:189-205 | src/main/scala/nebflow/core/tools/WriteTool.scala:158-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/EditTool.scala:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–17 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1338— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:1338-1349 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:866-882 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–17 lines × 2) src/main/scala/nebflow/llm/interface.scala:566— src/main/scala/nebflow/llm/interface.scala:566-582 | src/main/scala/nebflow/llm/interface.scala:846-858 — 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 `src/main/scala/nebflow/llm/interface.scala:566` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–16 lines × 4) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2190— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2190-2205 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2477-2488 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:1198-1213 | src/main/scala/nebflow/gateway/SocialRoutes.scala:107-118 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–15 lines × 5) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889-2897 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2923-2931 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2981-2991 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3023-3037 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3062-3073 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2889` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1840— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1840-1851 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:271-285 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1840` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4745— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4745-4774 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2670-2698 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–14 lines × 6) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:911— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:911-920 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:925-938 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:998-1007 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1399-1408 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1416-1429 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1539-1548 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:911` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:632— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:632-644 | src/main/scala/nebflow/core/LlmLogWriter.scala:730-742 | src/main/scala/nebflow/llm/providers/AnthropicAdapter.scala:62-75 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:632` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1421— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:1421-1435 | src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala:540-552 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSessionChatHandlers.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 371 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (3–14 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4919— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4919-4932 | src/main/scala/nebflow/gateway/SessionRecorder.scala:53-55 | src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2851-2864 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WebSocketRoutes.scala` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4919` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–14 lines × 2) src/main/scala/nebflow/core/tools/ChainWriteTool.scala:597— src/main/scala/nebflow/core/tools/ChainWriteTool.scala:597-610 | src/main/scala/nebflow/core/tools/NodeEditTool.scala:841-849 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/ChainWriteTool.scala:597` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–14 lines × 2) src/main/scala/nebflow/core/tools/DelegateTool.scala:95— src/main/scala/nebflow/core/tools/DelegateTool.scala:95-108 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:90-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/DelegateTool.scala:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2188— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2188-2199 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2212-2222 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:598-610 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:631-642 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–19 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3824— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3824-3836 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:487-505 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3824` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–13 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2951— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2951-2957 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1277-1289 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:2951` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (50 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:379— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:379-428 | src/main/scala/nebflow/llm/interface.scala:413-462 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–12 lines × 4) evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:857— evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:857-863 | evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:1484-1495 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1012-1020 | src/main/scala/nebflow/neblink/NeblinkClient.scala:1701-1712 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala` and `src/main/scala/nebflow/neblink/NeblinkClient.scala` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 528 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala:857` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–12 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2707— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2707-2715 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2789-2800 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:378-386 | src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala:671-682 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsFileOpsHandlers.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 449 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2707` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–12 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4056— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4056-4067 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:521-530 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:302-311 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:1007-1018 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3400— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3400-3411 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3416-3427 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3449-3460 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 3) src/main/scala/nebflow/core/tools/DelegateTool.scala:91— src/main/scala/nebflow/core/tools/DelegateTool.scala:91-101 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:86-96 | src/main/scala/nebflow/core/tools/SubagentTool.scala:26-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/DelegateTool.scala:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–12 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3594— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3594-3603 | src/main/scala/nebflow/gateway/WsSystemHandlers.scala:352-363 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsSystemHandlers.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7–12 lines × 2) src/main/scala/nebflow/agent/AgentSessionExecution.scala:1729— src/main/scala/nebflow/agent/AgentSessionExecution.scala:1729-1740 | src/main/scala/nebflow/agent/AgentSessionExecution.scala:1875-1881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–11 lines × 6) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2593— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2593-2603 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2891-2898 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2925-2932 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2983-2992 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3028-3038 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3067-3074 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2593` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2995` calls `downField`, `getOrElse` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:2901` 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 (9–11 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4032— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4032-4040 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:509-517 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:288-298 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:980-990 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:4032` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:528— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:528-538 | src/main/scala/nebflow/core/LlmLogWriter.scala:567-577 | src/main/scala/nebflow/core/LlmLogWriter.scala:616-626 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala` and `src/main/scala/nebflow/core/LlmLogWriter.scala` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 562 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala:528` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 3) src/main/scala/nebflow/cli/PluginCommand.scala:121— src/main/scala/nebflow/cli/PluginCommand.scala:121-130 | src/main/scala/nebflow/cli/PluginCommand.scala:166-176 | src/main/scala/nebflow/cli/PluginCommand.scala:213-222 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/cli/PluginCommand.scala:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–24 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:407— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:407-425 | src/main/scala/nebflow/gateway/ProjectsRoutes.scala:227-250 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:407` 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 (6–11 lines × 2) src/main/scala/nebflow/core/tools/MailTool.scala:675— src/main/scala/nebflow/core/tools/MailTool.scala:675-685 | src/main/scala/nebflow/core/tools/SubTaskTool.scala:143-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/MailTool.scala:675` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–11 lines × 2) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:648— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:648-655 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:1046-1056 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/social/FeishuBridgePlugin.scala:648` 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 (9–10 lines × 4) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:452— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:452-461 | evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:573-581 | src/main/scala/nebflow/llm/interface.scala:526-535 | src/main/scala/nebflow/llm/interface.scala:646-654 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala` and `src/main/scala/nebflow/llm/interface.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 668 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/llm/interface.scala:452` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 3) src/main/scala/nebflow/service/ConfigService.scala:340— src/main/scala/nebflow/service/ConfigService.scala:340-348 | src/main/scala/nebflow/service/ConfigService.scala:395-403 | src/main/scala/nebflow/service/ConfigService.scala:453-462 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/service/ConfigService.scala:340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3937— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3937-3946 | src/main/scala/nebflow/gateway/WsConfigHandlers.scala:652-659 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsConfigHandlers.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 338 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3937` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–9 lines × 3) src/main/scala/nebflow/core/tools/BashTool.scala:1210— src/main/scala/nebflow/core/tools/BashTool.scala:1210-1218 | src/main/scala/nebflow/core/tools/GenerateImageTool.scala:149-156 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:980-986 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/GenerateImageTool.scala:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:263— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:263-269 | src/main/scala/nebflow/core/permissions.scala:142-148 | src/main/scala/nebflow/gateway/ConfigRoutes.scala:64-71 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/ConfigRoutes.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/permissions.scala:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5–8 lines × 2) src/main/scala/nebflow/social/FeishuBridgePlugin.scala:770— src/main/scala/nebflow/social/FeishuBridgePlugin.scala:770-774 | src/main/scala/nebflow/social/WeixinIlinkBridgePlugin.scala:749-756 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 5) src/main/scala/nebflow/core/tools/BashTool.scala:1210— src/main/scala/nebflow/core/tools/BashTool.scala:1210-1219 | src/main/scala/nebflow/core/tools/BashTool.scala:1384-1390 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:981-987 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1015-1021 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1042-1048 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:981` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 4) src/main/scala/nebflow/core/tools/BashTool.scala:1320— src/main/scala/nebflow/core/tools/BashTool.scala:1320-1325 | src/main/scala/nebflow/core/tools/BashTool.scala:1385-1391 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:982-988 | src/main/scala/nebflow/core/tools/RemoteExecutor.scala:1016-1022 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/scala/nebflow/core/tools/RemoteExecutor.scala:982` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:933— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:933-939 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:330-336 | src/main/scala/nebflow/gateway/NeblinkRoutes.scala:402-409 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala` and `src/main/scala/nebflow/gateway/NeblinkRoutes.scala` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 729 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala:933` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–7 lines × 3) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3542— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3542-3548 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3550-3556 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:256-259 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3549` calls `deleteFolderRules` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:259` 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 (5–7 lines × 2) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6264— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6264-6268 | src/main/scala/nebflow/gateway/StaticRoutes.scala:639-645 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6264` 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 (6 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3625— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3625-3630 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3659-3664 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:293-298 | src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala:336-341 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala` and `src/main/scala/nebflow/gateway/WsMemoryFoldersHandlers.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3625` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3657` calls `downField`, `getOrElse` and `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:3623` 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 (4–6 lines × 4) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6220— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6220-6225 | evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6302-6307 | src/main/scala/nebflow/gateway/StaticRoutes.scala:518-521 | src/main/scala/nebflow/gateway/StaticRoutes.scala:876-881 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala:6219` calls `drop`, `NotFound` and `src/main/scala/nebflow/gateway/StaticRoutes.scala:518` 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 (5–6 lines × 2) src/main/scala/nebflow/gateway/PresenceRoutes.scala:969— src/main/scala/nebflow/gateway/PresenceRoutes.scala:969-974 | src/main/scala/nebflow/gateway/PresenceRoutes.scala:1025-1029 — 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 `src/main/scala/nebflow/gateway/PresenceRoutes.scala:969` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (852 lines × 2) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/shared/Defaults.scala:163— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/shared/Defaults.scala:163-1014 | src/main/scala/nebflow/shared/Defaults.scala:146-1614 — before extracting anything, compare `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/shared/Defaults.scala` and `src/main/scala/nebflow/shared/Defaults.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
End-of-life runtime: Scala 3.5 build.sbt:1— build.sbt declares Scala 3.5 as this project's build.sbt scalaVersion, and Scala 3.5, superseded by 3.6 on 2024-12-10. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2024-12-10 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:561— `continue-on-error: true` lets the step or job that runs `sbt "testOnly nebflow.core.project.MergeQueuePositionSpec"` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
Duplication concentrated across 6 sibling directories (54 clone groups) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510— 54 duplicated blocks under the repository root have copies in at least two of the sibling directories design, evidence, reports, scripts, src, tools — 50 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 54 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 54 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 54 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (5 clone groups) evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85— 5 duplicated blocks under evidence/ have copies in at least two of the sibling directories 20261019_131000_brand-standard-console, 20261019_145000_avatar-sharp, 20261019_153500_tasklist-display-fixes, 20261020_033000_plugin-panel, 20261020_122300_auth-trim — 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.
Duplicated block (442 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:2510 · REDACTED:2377 — 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 (286 matched lines × 2 locations) · ×1
Duplicated block with local edits (286 matched lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3075— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3075 · REDACTED:2934 — the two spans are one implementation copied and then locally edited — 2356 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (269 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:161— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:161 · REDACTED:204 — 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 (251 matched lines × 2 locations) · ×1
Duplicated block with local edits (251 matched lines × 2 locations) src/main/resources/web/js/persistence.js:637— src/main/resources/web/js/persistence.js:637 · src/main/resources/web/js/persistence.js:1030 — the two spans are one implementation copied and then locally edited — 2363 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 (231 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:222— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:222 · src/main/resources/web/js/explorer.js:152 — 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 (229 matched lines × 2 locations) · ×1
Duplicated block with local edits (229 matched lines × 2 locations) src/main/resources/web/js/bgAgentPopup.js:346— src/main/resources/web/js/bgAgentPopup.js:346 · src/main/resources/web/js/flowAgentPopup.js:392 — the two spans are one implementation copied and then locally edited — 1774 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 (218 matched lines × 2 locations) · ×1
Duplicated block with local edits (218 matched lines × 2 locations) scripts/e2e-perm-default.mjs:207— scripts/e2e-perm-default.mjs:207 · scripts/e2e-perm-global.mjs:223 — the two spans are one implementation copied and then locally edited — 2170 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 (207 matched lines × 2 locations) · ×1
Duplicated block with local edits (207 matched lines × 2 locations) scripts/e2e-dream-agent.mjs:48— scripts/e2e-dream-agent.mjs:48 · scripts/e2e-project-memory.mjs:42 — the two spans are one implementation copied and then locally edited — 1953 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 (201 matched lines × 2 locations) · ×1
Duplicated block with local edits (201 matched lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1645— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1645 · src/main/resources/web/js/sidebar/providersUi.js:173 — the two spans are one implementation copied and then locally edited — 2060 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (189 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3476— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:3476 · src/main/resources/web/js/sidebar/pathRules.js:13 — 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 (137 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1250— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1250 · src/main/resources/web/js/explorer.js:1625 — 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 (131 matched lines × 2 locations) · ×1
Duplicated block with local edits (131 matched lines × 2 locations) scripts/verify-flowmap-archive-visibility.cjs:34— scripts/verify-flowmap-archive-visibility.cjs:34 · scripts/verify-flowmap-deps.cjs:20 — the two spans are one implementation copied and then locally edited — 1444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (122 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:664— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:664 · src/main/resources/web/js/explorer.js:563 — 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 (117 matched lines × 2 locations) · ×1
Duplicated block with local edits (117 matched lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:74— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:74 · src/main/resources/web/js/explorer/selection.js:25 — the two spans are one implementation copied and then locally edited — 779 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (76 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1961— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1961 · REDACTED:1807 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (64 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:628— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:628 · REDACTED:685 — 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 (63 matched lines × 2 locations) · ×1
Duplicated block with local edits (63 matched lines × 2 locations) scripts/e2e-askuser-source-label.mjs:260— scripts/e2e-askuser-source-label.mjs:260 · scripts/e2e-dream-agent.mjs:209 — the two spans are one implementation copied and then locally edited — 528 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 (56 matched lines × 2 locations) · ×1
Duplicated block with local edits (56 matched lines × 2 locations) reports/20261025_115023_mail-perception-design-r2/shots.mjs:7— reports/20261025_115023_mail-perception-design-r2/shots.mjs:7 · reports/20261025_141024_mail-perception-design-r3/shots.mjs:7 — the two spans are one implementation copied and then locally edited — 674 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (54 lines × 2 locations) evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:563— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:563 · src/main/resources/web/js/explorer.js:495 — 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 (45 matched lines × 2 locations) · ×1
Duplicated block with local edits (45 matched lines × 2 locations) src/main/resources/web/js/fmDropboxCache.js:79— src/main/resources/web/js/fmDropboxCache.js:79 · src/main/resources/web/js/fmMessageCache.js:112 — the two spans are one implementation copied and then locally edited — 331 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (43 lines × 2 locations) src/main/resources/web/js/flowMap/badges.js:18— src/main/resources/web/js/flowMap/badges.js:18 · src/main/resources/web/js/fmNodeCard.js:61 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (40 lines × 2 locations) scripts/e2e-avatar-flicker.cjs:40— scripts/e2e-avatar-flicker.cjs:40 · REDACTED:38 — 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 (38 matched lines × 2 locations) · ×1
Duplicated block with local edits (38 matched lines × 2 locations) evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85— evidence/20261019_145000_avatar-sharp/shoot-avatar.mjs:85 · evidence/20261019_153500_tasklist-display-fixes/shoot-tasklist.mjs:133 — the two spans are one implementation copied and then locally edited — 313 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (36 lines × 2 locations) scripts/e2e-header-collision.cjs:170— scripts/e2e-header-collision.cjs:170 · scripts/shot-header-name.cjs:99 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (33 lines × 2 locations) src/main/resources/web/js/chatSearch.js:1021— src/main/resources/web/js/chatSearch.js:1021 · src/main/resources/web/js/chatSearch.js:1200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (32 lines × 2 locations) scripts/e2e-bgtask-panel-lifecycle.cjs:50— scripts/e2e-bgtask-panel-lifecycle.cjs:50 · scripts/e2e-subagentpanel-liveonly.cjs:78 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (32 matched lines × 2 locations) · ×1
Duplicated block with local edits (32 matched lines × 2 locations) src/main/resources/web/js/dropbox.js:685— src/main/resources/web/js/dropbox.js:685 · REDACTED:2994 — the two spans are one implementation copied and then locally edited — 248 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 (30 matched lines × 2 locations) · ×1
Duplicated block with local edits (30 matched lines × 2 locations) src/main/resources/web/js/contacts.js:356— src/main/resources/web/js/contacts.js:356 · src/main/resources/web/js/contacts.js:1060 — the two spans are one implementation copied and then locally edited — 281 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.
Boundary violation [package:test-suite-dependency] scripts/e2e-usage-dashboard-open.mjs:23— scripts/e2e-usage-dashboard-open.mjs:23 imports tests/helpers/session-rail.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Complex function validateVisualEvidenceContract (cyclomatic 159, cognitive 175) REDACTED:1376— validateVisualEvidenceContract has cyclomatic complexity 159 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 151, cognitive 246) src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:332— (anonymous) has cyclomatic complexity 151 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validateProjectContract (cyclomatic 149, cognitive 156) REDACTED:2378— validateProjectContract has cyclomatic complexity 149 and cognitive complexity 156; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildHistoryRow (cyclomatic 109, cognitive 214) src/main/resources/web/js/persistence.js:1017— buildHistoryRow has cyclomatic complexity 109 and cognitive complexity 214; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioB (cyclomatic 105, cognitive 79) tests/imgmsg-send.spec.mjs:569— scenarioB has cyclomatic complexity 105 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 88, cognitive 170) src/main/resources/web/js/persistence.js:627— (anonymous) has cyclomatic complexity 88 and cognitive complexity 170; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioQuote (cyclomatic 83, cognitive 40) tests/msgmenu.spec.mjs:393— scenarioQuote has cyclomatic complexity 83 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function deckFrame (cyclomatic 80, cognitive 126) src/main/resources/web/js/canvas.js:2536— deckFrame has cyclomatic complexity 80 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function send (cyclomatic 77, cognitive 105) src/main/resources/web/js/input.js:192— send has cyclomatic complexity 77 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function lintGeometry (cyclomatic 75, cognitive 137) src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs:972— lintGeometry has cyclomatic complexity 75 and cognitive complexity 137; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderTool (cyclomatic 73, cognitive 111) src/main/resources/web/js/chat.js:932— renderTool has cyclomatic complexity 73 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function openWorkspaceItem (cyclomatic 73, cognitive 108) src/main/resources/web/js/canvas.js:1274— openWorkspaceItem has cyclomatic complexity 73 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderDetail (cyclomatic 71, cognitive 83) src/main/resources/web/js/flowMapArchive.js:929— renderDetail has cyclomatic complexity 71 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildDelegateFm (cyclomatic 70, cognitive 70) src/main/resources/web/js/delegateFlowMap.js:72— buildDelegateFm has cyclomatic complexity 70 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 69, cognitive 88) src/main/resources/web/js/main.js:4486— (anonymous) has cyclomatic complexity 69 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function bgTaskRowHtml (cyclomatic 68, cognitive 74) src/main/resources/web/js/main/bgAgents.js:464— bgTaskRowHtml has cyclomatic complexity 68 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function inspectSvg (cyclomatic 67, cognitive 131) src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1175— inspectSvg has cyclomatic complexity 67 and cognitive complexity 131; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleSend (cyclomatic 66, cognitive 84) tools/weixin-sidecar/send.mjs:850— handleSend has cyclomatic complexity 66 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onmessage (cyclomatic 63, cognitive 108) REDACTED:1167— onmessage has cyclomatic complexity 63 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function nodeHtml (cyclomatic 63, cognitive 59) src/main/resources/web/js/fmNodeCard.js:260— nodeHtml has cyclomatic complexity 63 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 62, cognitive 94) src/main/resources/web/js/main.js:1289— (anonymous) has cyclomatic complexity 62 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function draw (cyclomatic 61, cognitive 90) src/main/resources/web/js/wikiGraph.js:1042— draw has cyclomatic complexity 61 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function lintFigureScene (cyclomatic 61, cognitive 83) src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs:1156— lintFigureScene has cyclomatic complexity 61 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioJump (cyclomatic 61, cognitive 39) tests/msgmenu.spec.mjs:1488— scenarioJump has cyclomatic complexity 61 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function makeReference (cyclomatic 60, cognitive 62) src/main/resources/web/js/reference.js:102— makeReference has cyclomatic complexity 60 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function afterSuite (cyclomatic 60, cognitive 46) tests/social-panel.spec.mjs:747— afterSuite has cyclomatic complexity 60 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioSelect (cyclomatic 60, cognitive 27) tests/msgmenu.spec.mjs:642— scenarioSelect has cyclomatic complexity 60 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 59, cognitive 126) scripts/e2e-header-collision.cjs:165— (anonymous) has cyclomatic complexity 59 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function replayHistoryPageInitialLoad (cyclomatic 58, cognitive 70) src/main/resources/web/js/chat/historyReplay.js:44— replayHistoryPageInitialLoad has cyclomatic complexity 58 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validateRegistryCandidateDecisions (cyclomatic 57, cognitive 68) REDACTED:2005— validateRegistryCandidateDecisions has cyclomatic complexity 57 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioUiFaces (cyclomatic 55, cognitive 17) tests/msgmenu.spec.mjs:1108— scenarioUiFaces has cyclomatic complexity 55 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 54, cognitive 40) scripts/verify-sidebar-toggle-v2.cjs:86— (anonymous) has cyclomatic complexity 54 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 main (cyclomatic 51, cognitive 62) · ×1
Complex function main (cyclomatic 51, cognitive 62) src/main/resources/seed/plugins/browser-use/skills/browser-session/scripts/chrome-session.mjs:77— main has cyclomatic complexity 51 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runTheme (cyclomatic 51, cognitive 36) scripts/e2e-wiki-graph-redesign.cjs:359— runTheme has cyclomatic complexity 51 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioF (cyclomatic 49, cognitive 63) tests/imgmsg-send.spec.mjs:1023— scenarioF has cyclomatic complexity 49 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rebuildSim (cyclomatic 49, cognitive 55) src/main/resources/web/js/wikiGraph.js:658— rebuildSim has cyclomatic complexity 49 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scenarioForwardWindow (cyclomatic 49, cognitive 18) tests/msgmenu.spec.mjs:923— scenarioForwardWindow has cyclomatic complexity 49 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function inspectMermaid (cyclomatic 47, cognitive 60) src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1088— inspectMermaid has cyclomatic complexity 47 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 46, cognitive 148) · ×1
Complex function main (cyclomatic 46, cognitive 148) src/main/resources/seed/plugins/browser-use/skills/paper-download/scripts/paper-download.mjs:200— main has cyclomatic complexity 46 and cognitive complexity 148; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function chainFromStoreRecord (cyclomatic 46, cognitive 61) src/main/resources/web/js/delegateChainStub.js:264— chainFromStoreRecord has cyclomatic complexity 46 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
REDACTED: 6178 lines of code REDACTED:1— REDACTED has 6178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/main.js · ×1
src/main/resources/web/js/main.js: 4600 lines of code src/main/resources/web/js/main.js:1— src/main/resources/web/js/main.js has 4600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/canvas.js · ×1
src/main/resources/web/js/canvas.js: 4560 lines of code src/main/resources/web/js/canvas.js:1— src/main/resources/web/js/canvas.js has 4560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/chat.js · ×1
src/main/resources/web/js/chat.js: 4025 lines of code src/main/resources/web/js/chat.js:1— src/main/resources/web/js/chat.js has 4025 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· evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED · ×1
evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED: 3409 lines of code evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1— evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED has 3409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 3116 lines of code REDACTED:1— REDACTED has 3116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs · ×1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs: 2468 lines of code src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs:1— src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/workbench/verify-runtime.mjs has 2468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/flowMapTab.js · ×1
src/main/resources/web/js/flowMapTab.js: 2248 lines of code src/main/resources/web/js/flowMapTab.js:1— src/main/resources/web/js/flowMapTab.js has 2248 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/input.js · ×1
src/main/resources/web/js/input.js: 2207 lines of code src/main/resources/web/js/input.js:1— src/main/resources/web/js/input.js has 2207 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/chatSearch.js · ×1
src/main/resources/web/js/chatSearch.js: 1908 lines of code src/main/resources/web/js/chatSearch.js:1— src/main/resources/web/js/chatSearch.js has 1908 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/socialPanel.js · ×1
src/main/resources/web/js/socialPanel.js: 1860 lines of code src/main/resources/web/js/socialPanel.js:1— src/main/resources/web/js/socialPanel.js has 1860 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/explorer.js · ×1
src/main/resources/web/js/explorer.js: 1859 lines of code src/main/resources/web/js/explorer.js:1— src/main/resources/web/js/explorer.js has 1859 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/persistence.js · ×1
src/main/resources/web/js/persistence.js: 1629 lines of code src/main/resources/web/js/persistence.js:1— src/main/resources/web/js/persistence.js has 1629 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/wikiGraph.js · ×1
src/main/resources/web/js/wikiGraph.js: 1613 lines of code src/main/resources/web/js/wikiGraph.js:1— src/main/resources/web/js/wikiGraph.js has 1613 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· evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js · ×1
evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js: 1476 lines of code evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js:1— evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/resources/web/js/explorer.js has 1476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/projectTab.js · ×1
src/main/resources/web/js/projectTab.js: 1448 lines of code src/main/resources/web/js/projectTab.js:1— src/main/resources/web/js/projectTab.js has 1448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/micOrb.js · ×1
src/main/resources/web/js/micOrb.js: 1444 lines of code src/main/resources/web/js/micOrb.js:1— src/main/resources/web/js/micOrb.js has 1444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/flowMapArchive.js · ×1
src/main/resources/web/js/flowMapArchive.js: 1420 lines of code src/main/resources/web/js/flowMapArchive.js:1— src/main/resources/web/js/flowMapArchive.js has 1420 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/localStore.js · ×1
src/main/resources/web/js/localStore.js: 1392 lines of code src/main/resources/web/js/localStore.js:1— src/main/resources/web/js/localStore.js has 1392 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/utils.js · ×1
src/main/resources/web/js/utils.js: 1388 lines of code src/main/resources/web/js/utils.js:1— src/main/resources/web/js/utils.js has 1388 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs · ×1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs: 1382 lines of code src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs:1— src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/figure-engine.mjs has 1382 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/friendsApi.js · ×1
src/main/resources/web/js/friendsApi.js: 1379 lines of code src/main/resources/web/js/friendsApi.js:1— src/main/resources/web/js/friendsApi.js has 1379 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1345 lines of code REDACTED:1— REDACTED has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs · ×1
src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs: 1261 lines of code src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs:1— src/main/resources/seed/plugins/slideblocks/skills/slideblocks/assets/diagram/diagram-engine.mjs has 1261 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/contacts.js · ×1
src/main/resources/web/js/contacts.js: 1235 lines of code src/main/resources/web/js/contacts.js:1— src/main/resources/web/js/contacts.js has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/onboarding.js · ×1
src/main/resources/web/js/onboarding.js: 1198 lines of code src/main/resources/web/js/onboarding.js:1— src/main/resources/web/js/onboarding.js has 1198 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· tools/weixin-sidecar/msgloop.mjs · ×1
tools/weixin-sidecar/msgloop.mjs: 1108 lines of code tools/weixin-sidecar/msgloop.mjs:1— tools/weixin-sidecar/msgloop.mjs has 1108 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/usageDashboard.js · ×1
src/main/resources/web/js/usageDashboard.js: 1107 lines of code src/main/resources/web/js/usageDashboard.js:1— src/main/resources/web/js/usageDashboard.js has 1107 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/taskList.js · ×1
src/main/resources/web/js/taskList.js: 1056 lines of code src/main/resources/web/js/taskList.js:1— src/main/resources/web/js/taskList.js has 1056 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/delegatePanoramaView.js · ×1
src/main/resources/web/js/delegatePanoramaView.js: 1051 lines of code src/main/resources/web/js/delegatePanoramaView.js:1— src/main/resources/web/js/delegatePanoramaView.js has 1051 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/dropbox.js · ×1
src/main/resources/web/js/dropbox.js: 1049 lines of code src/main/resources/web/js/dropbox.js:1— src/main/resources/web/js/dropbox.js has 1049 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/popArtifacts.js · ×1
src/main/resources/web/js/popArtifacts.js: 1049 lines of code src/main/resources/web/js/popArtifacts.js:1— src/main/resources/web/js/popArtifacts.js has 1049 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· tools/weixin-sidecar/send.mjs · ×1
tools/weixin-sidecar/send.mjs: 1027 lines of code tools/weixin-sidecar/send.mjs:1— tools/weixin-sidecar/send.mjs has 1027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/bgAgentPopup.js · ×1
src/main/resources/web/js/bgAgentPopup.js: 1003 lines of code src/main/resources/web/js/bgAgentPopup.js:1— src/main/resources/web/js/bgAgentPopup.js has 1003 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/viewers/shared.js · ×1
src/main/resources/web/js/viewers/shared.js: 1002 lines of code src/main/resources/web/js/viewers/shared.js:1— src/main/resources/web/js/viewers/shared.js has 1002 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/activityBar.js · ×1
src/main/resources/web/js/activityBar.js: 985 lines of code src/main/resources/web/js/activityBar.js:1— src/main/resources/web/js/activityBar.js has 985 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/perception.js · ×1
src/main/resources/web/js/perception.js: 949 lines of code src/main/resources/web/js/perception.js:1— src/main/resources/web/js/perception.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/plugins.js · ×1
src/main/resources/web/js/plugins.js: 949 lines of code src/main/resources/web/js/plugins.js:1— src/main/resources/web/js/plugins.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/secretsPanel.js · ×1
src/main/resources/web/js/secretsPanel.js: 921 lines of code src/main/resources/web/js/secretsPanel.js:1— src/main/resources/web/js/secretsPanel.js has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/main/resources/web/js/delegateChainView.js · ×1
src/main/resources/web/js/delegateChainView.js: 869 lines of code src/main/resources/web/js/delegateChainView.js:1— src/main/resources/web/js/delegateChainView.js has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· Type errors in this package cannot fail any build or CI step · ×1
Type errors in this package cannot fail any build or CI step package.json:6— the root package is TypeScript, but a type error in it cannot fail anything this repository runs: its `build` script (`node REDACTED`) compiles TypeScript with a transpile-only tool that strips types without checking them, and no script, config or CI step of the package runs `tsc --noEmit` or another type checker over it. Add a type check that can fail — a `typecheck` script running `tsc --noEmit` (or `vue-tsc`/`svelte-check`) that CI or the workspace pipeline runs, or a build step that checks before it bundles.
Dead file (~266 LoC) scripts/verify-task-progress.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~251 LoC) scripts/verify-batch829.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~216 LoC) scripts/verify-ref-c3.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~183 LoC) scripts/verify-askuser-passthrough.retired.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~168 LoC) reports/20261028_120721_replay-terminal-batch__delegate-nebflow-810dea92/sim-replay-fold.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~164 LoC) evidence/delegate-panorama-20261022/shoot.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~126 LoC) evidence/delegate-panorama-20261022/shoot-merge-fixture.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~118 LoC) scripts/verify-sidebar-canvas.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~111 LoC) evidence/20261020_033000_plugin-panel/shoot.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~95 LoC) reports/20261025_141024_mail-perception-design-r3/shots.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~94 LoC) scripts/verify-ref-p12.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~84 LoC) scripts/verify-i18n-sweep.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~83 LoC) reports/20261025_115023_mail-perception-design-r2/shots.mjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~77 LoC) REDACTED— no import path from any entry point (466 application, 100 tooling, 313 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 (~76 LoC) scripts/verify-ref-d4.cjs— no import path from any entry point (466 application, 100 tooling, 313 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 (~49 LoC) evidence/20261019_imgslow538-timing/remote-probe-snippet-v2.js— no import path from any entry point (466 application, 100 tooling, 313 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency '@remotion/cli' src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/package.json:7— Declared in src/main/resources/seed/plugins/visual-report/skills/motion-toolkit/scripts/remotion-scaffold/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.
Weak hash algorithm src/main/scala/nebflow/neblink/NeblinkModel.scala:290— 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+ (`MessageDigest.getInstance("SHA-256")`) 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.
Third-party script without Subresource Integrity src/main/resources/seed/plugins/design-cards/skills/guizang-social-card-skill/assets/template-swiss-card.html:10— `https://unpkg.com/lucide@latest/dist/umd/lucide.min.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.
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 src/main/scala/nebflow/core/McpToolGate.scala:268— `GateRedact.redact` is public and takes `json: Json` from its caller, and it calls itself at line 268 with a piece of `json` (and at line 271), not as a tail call the compiler turns into a loop — and nowhere in `GateRedact.redact` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a walk like this one throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25), while `ujson.read`, Jackson's `readTree` before 2.15 and circe before 0.14.16 accept any nesting (2,000,000 levels from 4 MB) and circe 0.14.16 accepts 4,096 — on a cold JVM even play-json's cap of 1,000 is past the point the walk fails. `StackOverflowError` is not `NonFatal`: `Try`, `case NonFatal(e)` and `recover` do not stop it, and in a `Future` on the global execution context it leaves the future forever incomplete. Thread a depth argument through `GateRedact.redact` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Duplicated predicate evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:90— `!!overlay && overlay.classList.contains('on')` appears character-identically in 2 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, 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 src/main/resources/web/js/askPending.js:43— `!Array.isArray(items) || items.length === 0` appears character-identically in 4 files — src/main/resources/web/js/askPending.js, src/main/resources/web/js/chat.js, src/main/resources/web/js/input.js, src/main/resources/web/js/perception.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 src/main/resources/web/js/fmMessageCache.js:69— `!Array.isArray(list) || list.length === 0` appears character-identically in 2 files — src/main/resources/web/js/fmMessageCache.js, src/main/resources/web/js/localStore.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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:668— `!HHMM_RE.test(s.start) || !HHMM_RE.test(s.end)` appears character-identically in 2 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, 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 src/main/resources/web/js/mergeQueueStatus.js:54— `!Number.isInteger(p) || !Number.isInteger(m) || p < 1 || m < 1 || p > m` appears character-identically in 2 files — src/main/resources/web/js/mergeQueueStatus.js, src/main/resources/web/js/mergeQueueView.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 REDACTED:117— `!Number.isInteger(port) || port <= 0 || port > 65535` appears character-identically in 2 files — REDACTED, 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 evidence/delegate-panorama-20261022/shoot-merge-fixture.mjs:98— `!b.hidden && b.querySelector('.dvp-canvas') && b.getBoundingClientRect().height > 40` appears character-identically in 2 files — evidence/delegate-panorama-20261022/shoot-merge-fixture.mjs, evidence/delegate-panorama-20261022/shoot.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1720— `!baseUrl || !/^https?:\/\//.test(baseUrl)` appears character-identically in 3 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, src/main/resources/web/js/onboarding.js, src/main/resources/web/js/sidebar/providersUi.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 REDACTED:3748— `!box || box.dataset.quoteJump !== 'ready'` appears character-identically in 2 files — REDACTED, src/main/resources/web/js/msgQuote.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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:910— `!content || content.offsetParent === null` appears character-identically in 2 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, 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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:1404— `!cur || !cur.supported || autostartPendingSet !== null` appears character-identically in 2 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, 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 src/main/resources/web/js/fmDropboxCache.js:170— `!e || !Array.isArray(e.msgs) || e.msgs.length === 0` appears character-identically in 3 files — src/main/resources/web/js/fmDropboxCache.js, src/main/resources/web/js/fmMessageCache.js, src/main/resources/web/js/localStore.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 src/main/resources/web/js/secretsPanel.js:851— `!el.hasAttribute('disabled') && el.offsetParent !== null` appears character-identically in 2 files — src/main/resources/web/js/secretsPanel.js, src/main/resources/web/js/socialPanel.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 src/main/resources/web/js/canvas.js:3334— `!g.axis && (Math.abs(g.dx) > CARDHEAD_AXIS_LOCK_PX || Math.abs(g.dy) > CARDHEAD_AXIS_LOCK_PX)` appears character-identically in 2 files — src/main/resources/web/js/canvas.js, src/main/resources/web/js/mobile/navController.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 src/main/resources/web/js/dropbox.js:850— `!m || m.msgId === undefined || m.msgId === null` appears character-identically in 2 files — src/main/resources/web/js/dropbox.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 src/main/resources/web/js/friendsApi.js:1084— `!raw || typeof raw !== 'object' || Array.isArray(raw)` appears character-identically in 2 files — src/main/resources/web/js/friendsApi.js, src/main/resources/web/js/mergeQueueStatus.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 src/main/resources/web/js/chat.js:2826— `!state.ws || state.ws.readyState !== WebSocket.OPEN` appears character-identically in 4 files — src/main/resources/web/js/chat.js, src/main/resources/web/js/input.js, src/main/resources/web/js/main.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 src/main/resources/web/js/hotStamp.js:33— `( (window).__BRAND__?.lowerName) || 'stand'` appears character-identically in 2 files — src/main/resources/web/js/hotStamp.js, src/main/resources/web/js/swReg.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 scripts/e2e-perm-default.mjs:335— `(j.type === 'sessionList' || j.type === 'agentSessionList') && Array.isArray(j.sessions)` appears character-identically in 2 files — scripts/e2e-perm-default.mjs, scripts/e2e-perm-global.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/main/resources/web/js/chat/popArtifact.js:13— `(name !== 'Pop' && name !== 'Card') || !inputJson` appears character-identically in 2 files — src/main/resources/web/js/chat/popArtifact.js, src/main/resources/web/js/popArtifacts.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 src/main/resources/web/js/contacts.js:260— `(person && (person.name || person.neblinkId)) || '?'` appears character-identically in 3 files — src/main/resources/web/js/contacts.js, src/main/resources/web/js/friendGroups.js, src/main/resources/web/js/messages/elements.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 scripts/e2e-dispatcher-context-catalog.mjs:189— `/Compiling|compiling|Done|done|running|Running|error|Exception|listen|Listen|started|Started|Gateway|port/.test(s) || tag === '[sbt!]'` appears character-identically in 4 files — scripts/e2e-dispatcher-context-catalog.mjs, scripts/e2e-dream-agent.mjs, scripts/e2e-project-memory.mjs, scripts/smoke-nodename-refresh.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/main/resources/web/js/chat.js:3157— `Array.isArray(attachments) && attachments.length > 0` appears character-identically in 2 files — src/main/resources/web/js/chat.js, src/main/resources/web/js/friendsApi.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 src/main/resources/web/js/input.js:690— `Array.isArray(items) && items.length > 0` appears character-identically in 2 files — src/main/resources/web/js/input.js, src/main/resources/web/js/main.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 evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED:389— `HHMM_RE.test(s.start) && HHMM_RE.test(s.end) && toMin(s.start) > toMin(s.end)` appears character-identically in 2 files — evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/REDACTED, 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.
Silent fallback default in catch src/main/scala/nebflow/cli/ProcessManager.scala:442— `descendantsOfReal` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/cli/uiStore.scala:244— `loadHistory` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/AtomicJson.scala:420— `readJournalRecords` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/JvmRequirement.scala:62— `safeProperty` swallows every exception into `"unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/JvmRequirement.scala:99— `jarPathOfSelf` swallows every exception into `"unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/ChainStore.scala:100— `listSync` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/DelegateDeliveryReceipts.scala:166— `list` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/DelegateRegistry.scala:191— `list` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/DelegateWorkReport.scala:54— `appendixFor` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/DelegateWorkReport.scala:117— `changedReportFiles` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/delegate/DeviceDelegate.scala:262— `neblinkDeviceId` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/executor/ExternalSpawnConfig.scala:58— `proxyEnvFrom` swallows every exception into `Map.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/plugin/PluginRegistry.scala:451— `fileManifest` swallows every exception into `Map.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/plugin/PluginRegistry.scala:516— `treeSig` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/secrets/AskUserSecretSink.scala:268— `loadDeadlines` swallows every exception into `Map.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/BgTaskOutputDisk.scala:187— `pairCount` swallows every exception into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/DeviceProfile.scala:332— `loadSyncSafe` swallows every exception into `Map.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/FleetRoster.scala:141— `registrySyncSafe` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/MemoryDirectWriteGuard.scala:83— `preSizeBytes` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/shell.scala:575— `sampleCpuTimeViaPs` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/tools/shell.scala:630— `parsePsTimeToNanos` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/core/util/ProcessTree.scala:77— `descendantsViaHandle` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/dropbox/TargetDirGuard.scala:69— `loadConfiguredRoots` swallows every exception into `Set.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/gateway/LanAddresses.scala:51— `list` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch src/main/scala/nebflow/gateway/StaleProcessGuard.scala:130— `portListenerPids` swallows every exception into `List.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch case or in the Scaladoc, and the row stops firing.
Disabled test src/test/scala/nebflow/agent/AgentControlE2ESpec.scala:239— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test src/test/scala/nebflow/agent/AgentControlE2ESpec.scala:319— 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 src/test/scala/nebflow/agent/DeleteSessionCascadeSpec.scala:226— 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 src/test/scala/nebflow/agent/DeleteSessionCascadeSpec.scala:273— 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 src/test/scala/nebflow/agent/NestedDelegateNotifySpec.scala:227— 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 src/test/scala/nebflow/agent/StuckDelegateReleaseSpec.scala:232— 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 src/test/scala/nebflow/agent/StuckDelegateReleaseSpec.scala:421— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:147— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:184— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:197— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:230— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:267— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:297— 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 src/test/scala/nebflow/core/daemon/DaemonSpec.scala:312— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
redundant comment scripts/verify-i18n-sweep.cjs:77— "zero page errors" repeats the code it sits on: 3 of its 3 words (zero, page, errors) are already in `ok('A7 zero page errors', errs.length === 0, errs.slice(0, 3));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment scripts/verify-sidebar-canvas.cjs:97— "close the flow-run tab and dismiss it" repeats the code it sits on: 4 of its 5 words (close, flow, run, tab) are already in `canvas.closeTab('flow-run-inst1');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/main/resources/seed/plugins/document-production/skills/pdf/scripts/html2pdf-next.js:691— "── pdf-lib post-processing ──" repeats the code it sits on: 4 of its 4 words (pdf, lib, post, processing) are already in `console.log('\n🔧 Post-processing (pdf-lib):');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/main/resources/web/js/i18n.js:207— "Session panel title" repeats the code it sits on: 3 of its 3 words (session, panel, title) are already in `const sessionPanelTitle = document.querySelector('#panel-sessions .panel-title');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/main/resources/web/js/i18n.js:211— "Settings modal title" repeats the code it sits on: 3 of its 3 words (settings, modal, title) are already in `const settingsModalTitle = document.getElementById('settings-modal-title');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/main/resources/web/js/input/inputModes.js:74— "Cancel ask mode if active" repeats the code it sits on: 4 of its 4 words (cancel, ask, mode, active) are already in `if (activeView.stream.askMode) cancelAskMode();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/main/resources/web/js/input/inputModes.js:100— "Cancel other modes if active" repeats the code it sits on: 3 of its 3 words (cancel, modes, active) are already in `if (activeView.stream.askMode) cancelAskMode();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/smoke.spec.mjs:216— "Try to get flow def for code-review" repeats the code it sits on: 5 of its 6 words (get, flow, def, code, review) are already in `const resp = await request.get(`${BASE}/api/flow/def/code-review`, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tools/weixin-sidecar/msgloop-media.test.mjs:151— "base64(hex string)" repeats the code it sits on: 4 of its 4 words (base, 64, hex, string) are already in `const aesKey32 = Buffer.from(KEY_HEX).toString("base64");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Hand-rolled JSON/XML parsing via regex src/main/scala/nebflow/neblink/NeblinkRelayTunnel.scala:1213— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex src/main/resources/web/js/chat.js:697— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex src/main/resources/web/js/viewers/epub.js:84— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex src/main/resources/seed/plugins/document-production/skills/pdf/scripts/poster_validate.py:115— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex src/main/resources/seed/plugins/document-production/skills/docx/scripts/add_toc_placeholders.py:161— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
Interpolated log message defeats structured logging src/main/scala/nebflow/shared/logging.scala:33— `debug` at line 33 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix.
Interpolated log message defeats structured logging src/main/scala/nebflow/shared/logging.scala:46— `debug` at line 46 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix.
Interpolated log message defeats structured logging src/main/scala/nebflow/shared/logging.scala:49— `debug` at line 49 is handed an interpolated string as its message through SLF4J, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. scala-logging's `LazyLogging` logger takes an `s"…"` message apart into that pattern at compile time, so switching to it is also a fix.
D21 · Naming Consistency· `NebflowUI` spells `UI` where 20 names in the project spell it `Ui` · ×2
`NebflowUI` spells `UI` where 20 names in the project spell it `Ui` src/main/scala/nebflow/cli/ui.scala:12— 20 of 22 names in project repository spell the token `Ui` (20 of 22; unit: names in project repository containing `Ui`). Peers: SessionStore.estimateUiCacheBytes (src/main/scala/nebflow/core/SessionStore.scala:266); SessionStore.shrinkOversizedUiFiles (src/main/scala/nebflow/core/SessionStore.scala:341); SessionStore.mergeUiMessages (src/main/scala/nebflow/core/SessionStore.scala:1374); SessionStore.mergeSessionFromCloud(cloudUiMessages) (src/main/scala/nebflow/core/SessionStore.scala:1392); SessionStore.loadUiMessages (src/main/scala/nebflow/core/SessionStore.scala:1425). Rename to `NebflowUi`. [rule N6]
`NebflowUI` spells `UI` where 20 names in the project spell it `Ui` src/main/scala/nebflow/cli/ui.scala:143— 20 of 22 names in project repository spell the token `Ui` (20 of 22; unit: names in project repository containing `Ui`). Peers: SessionStore.estimateUiCacheBytes (src/main/scala/nebflow/core/SessionStore.scala:266); SessionStore.shrinkOversizedUiFiles (src/main/scala/nebflow/core/SessionStore.scala:341); SessionStore.mergeUiMessages (src/main/scala/nebflow/core/SessionStore.scala:1374); SessionStore.mergeSessionFromCloud(cloudUiMessages) (src/main/scala/nebflow/core/SessionStore.scala:1392); SessionStore.loadUiMessages (src/main/scala/nebflow/core/SessionStore.scala:1425). Rename to `NebflowUi`. [rule N6]
R7 · Dead Code· Unused module-local declaration 'SID' · ×2
Unused module-local declaration 'SID' scripts/smoke-scheduled-task.mjs:98— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Unused module-local declaration 'SID' tests/askuser-attach.spec.mjs:33— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Silent fallback default on parse failure src/main/scala/nebflow/cli/HealthCommand.scala:41— `javaMajor` answers `0` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default on parse failure src/main/scala/nebflow/neblink/LogtoAuthCode.scala:329— `decodeIdTokenClaims` answers `Map.empty` when `IllegalArgumentException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Subsumed condition operand src/test/scala/nebflow/neblink/FriendMessageFooterBadgeSpec.scala:128— `t.startsWith("*/")` can never decide this `||` — every value satisfying `t.startsWith("*/")` also satisfies `t.startsWith("*")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/test/scala/nebflow/agent/SubAgentInboxMirrorSpec.scala:70— `t.startsWith("*/")` can never decide this `||` — every value satisfying `t.startsWith("*/")` also satisfies `t.startsWith("*")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Fat interface: AgentRuntimePort (16 abstract members) src/main/scala/nebflow/core/AgentRuntimePort.scala:41— `AgentRuntimePort` declares 16 abstract members: `sessionStore`, `actorSystem`, `contextWindow`, `effectiveSafetyMode`, `subAgentTaskStore`, `pluginMcp`, `scheduledTaskStore`, `scheduledTaskService`, `neblinkService`, `dropboxService`, `friendService`, `healthMonitor`, `interactionHubRef`, `spawnAgentActor`, `spawnSupervisedAdapter`, `agentActorBehavior`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Documentation: no map of the repository's parts README.md:1— The repository has 3 units (`guizang-social-card-skill`, `remotion-scaffold`, `three-template`); `README.md` and the documents it links name none of them. Add a short list of the parts and what each does.
D21 · Naming Consistency· `safeGetJSON` spells `JSON` where 28 names in the project spell it `Json` · ×1
`safeGetJSON` spells `JSON` where 28 names in the project spell it `Json` src/main/resources/web/js/persistence.js:124— 28 of 29 names in project nebflow-web spell the token `Json` (28 of 29; unit: names in project nebflow-web containing `Json`). Peers: e2e-archive-restart-visibility.readJson (scripts/e2e-archive-restart-visibility.mjs:237); e2e-onboarding-v2-isolated.httpGetJson (scripts/e2e-onboarding-v2-isolated.mjs:202); slideblocks-client.readJsonResponse (src/main/resources/seed/plugins/slideblocks/skills/slideblocks/scripts/slideblocks-client.mjs:397); slideblocks-client.requestJson (src/main/resources/seed/plugins/slideblocks/skills/slideblocks/scripts/slideblocks-client.mjs:446); slideblocks-client.outputJson (src/main/resources/seed/plugins/slideblocks/skills/slideblocks/scripts/slideblocks-client.mjs:589). Rename to `safeGetJson`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion package.json:1— `(repository root)` (383602 LoC, 2510 module-visible types across 115 directories) overshoots its size bounds. 1 of 4 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 5.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.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `src/main/resources/seed/plugins/document-production/skills/xlsx/engines/chart.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`.
No dependency-update automation package.json:8— `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code· Unused module-local declaration 'withTs' · ×1
Unused module-local declaration 'withTs' evidence/20261019_210000_mobile-quickwins/harness/boot-harness.mjs:16— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'netLog' · ×1
Unused module-local declaration 'netLog' evidence/20261019_210000_mobile-quickwins/harness/boot-harness.mjs:28— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'blankWindow' · ×1
Unused module-local declaration 'blankWindow' scripts/e2e-avatar-flicker.cjs:386— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'ctxOf' · ×1
Unused module-local declaration 'ctxOf' scripts/e2e-dream-agent.mjs:321— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'waitDispatcherReq' · ×1
Unused module-local declaration 'waitDispatcherReq' scripts/e2e-plugin-surface-live.mjs:122— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'SENTINEL_ANYWHERE' · ×1
Unused module-local declaration 'SENTINEL_ANYWHERE' scripts/verify-cardguard-nosentinel.cjs:123— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'showToast' · ×1
Unused module-local declaration 'showToast' src/main/resources/web/js/bgAgentPopup.js:34— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'CARDHEAD_FOLLOW_CAP_PX' · ×1
Unused module-local declaration 'CARDHEAD_FOLLOW_CAP_PX' src/main/resources/web/js/canvas.js:3279— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'handleFileSelected' · ×1
Unused module-local declaration 'handleFileSelected' src/main/resources/web/js/dropbox.js:608— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'addPathAttachment' · ×1
Unused module-local declaration 'addPathAttachment' src/main/resources/web/js/input.js:2244— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'devLegacyEntry' · ×1
Unused module-local declaration 'devLegacyEntry' src/main/resources/web/js/localStore.js:713— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'EDGE_ZONE_PX' · ×1
Unused module-local declaration 'EDGE_ZONE_PX' src/main/resources/web/js/mobile/canvasGestures.js:26— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'ensureInjectedBack' · ×1
Unused module-local declaration 'ensureInjectedBack' src/main/resources/web/js/mobile/navController.js:796— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'openTimer' · ×1
Unused module-local declaration 'openTimer' src/main/resources/web/js/mobile/taskPanel.js:43— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'showLoginSuccessBanner' · ×1
Unused module-local declaration 'showLoginSuccessBanner' src/main/resources/web/js/neblink.js:28— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'busy' · ×1
Unused module-local declaration 'busy' src/main/resources/web/js/onboarding.js:65— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'PROJECT_CARD_ENTER_MS' · ×1
Unused module-local declaration 'PROJECT_CARD_ENTER_MS' src/main/resources/web/js/projectTab.js:50— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'cardFaceSignature' · ×1
Unused module-local declaration 'cardFaceSignature' src/main/resources/web/js/socialPanel.js:385— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'buildEmpty' · ×1
Unused module-local declaration 'buildEmpty' src/main/resources/web/js/taskList.js:1017— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'BASH_INPUT' · ×1
Unused module-local declaration 'BASH_INPUT' tests/badge-injected-turn.spec.mjs:89— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'approx' · ×1
Unused module-local declaration 'approx' tests/canvas-card-window.spec.mjs:42— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
No app-layer HTTPS enforcement detected — This repository runs an HTTP server and nothing in its Scala source or committed configuration secures the transport: no HTTPS served (akka/pekko-http `ConnectionContext.httpsServer`/`enableHttps`, an http4s builder's `withTLS`, Jetty's `SslContextFactory`, zio-http's `SSLConfig`, Play's `https.port`), no `Strict-Transport-Security` header, HSTS middleware or Play `RedirectHttpsFilter`, no `X-Forwarded-Proto` read or Play `play.http.forwarded.trustedProxies` for a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:111 — `HttpServer.create`.
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Scala server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: src/main/scala/nebflow/core/hotrestart/HealthProbe.scala:111 — `HttpServer.create`.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 20/93 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· Scala's null is not held to the type system everywhere · ×1
Scala's null is not held to the type system everywhere — No build over this repository's 667 Scala product file(s) passes `-Yexplicit-nulls`, enables WartRemover's `Null` wart or runs Scalafix's `DisableSyntax.noNulls`, so every reference type admits null and nothing reports a `null` written into the code or returned from a Java API — the first one to reach a method call is a `NullPointerException`. `Option` by convention is a habit no tool here holds the code to.
Outdated: ch.qos.logback:logback-classic — `ch.qos.logback %% logback-classic` is declared at 1.5.16 in REDACTED, but 1.6.7 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.5.16 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: ch.qos.logback:logback-core — `ch.qos.logback %% logback-core` is declared at 1.5.16 in REDACTED, but 1.6.7 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.5.16 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: co.fs2:fs2-core_3 — `co.fs2 %% fs2-core_3` is declared at 3.11.0 in REDACTED, but 3.14.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 3.11.0 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: com.github.scopt:scopt_3 — `com.github.scopt %% scopt_3` is declared at 4.1.0 in REDACTED, but 4.2.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.1.0 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: com.larksuite.oapi:oapi-sdk — `com.larksuite.oapi %% oapi-sdk` is declared at 2.8.5 in REDACTED, but 2.8.7 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 2.8.5 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: com.lihaoyi:os-lib_3 — `com.lihaoyi %% os-lib_3` is declared at 0.11.3 in REDACTED, but 0.11.10 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.11.3 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: com.softwaremill.sttp.client4:core_3 — `com.softwaremill.sttp.client4 %% core_3` is declared at 4.0.0-M1 in REDACTED, but 4.1.2 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.0.0-M1 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: com.softwaremill.sttp.client4:fs2_3 — `com.softwaremill.sttp.client4 %% fs2_3` is declared at 4.0.0-M1 in REDACTED, but 4.1.2 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.0.0-M1 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: io.circe:circe-core_3 — `io.circe %% circe-core_3` is declared at 0.14.12 in REDACTED, but 0.14.17 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.14.12 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: io.circe:circe-generic_3 — `io.circe %% circe-generic_3` is declared at 0.14.12 in REDACTED, but 0.14.17 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.14.12 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: io.circe:circe-parser_3 — `io.circe %% circe-parser_3` is declared at 0.14.12 in REDACTED, but 0.14.17 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.14.12 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: io.circe:circe-yaml_3 — `io.circe %% circe-yaml_3` is declared at 0.14.2 in REDACTED, but 1.15.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.14.2 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: io.github.java-diff-utils:java-diff-utils — `io.github.java-diff-utils %% java-diff-utils` is declared at 4.12 in REDACTED, but 4.18 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.12 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.apache.pekko:pekko-actor-typed_3 — `org.apache.pekko %% pekko-actor-typed_3` is declared at 1.1.3 in REDACTED, but 2.0.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.1.3 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.http4s:http4s-circe_3 — `org.http4s %% http4s-circe_3` is declared at 0.23.30 in REDACTED, but 0.23.38 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.23.30 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.http4s:http4s-dsl_3 — `org.http4s %% http4s-dsl_3` is declared at 0.23.30 in REDACTED, but 0.23.38 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.23.30 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.http4s:http4s-ember-server_3 — `org.http4s %% http4s-ember-server_3` is declared at 0.23.30 in REDACTED, but 0.23.38 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 0.23.30 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.jline:jline-reader — `org.jline %% jline-reader` is declared at 3.29.0 in REDACTED, but 4.7.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 3.29.0 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.jline:jline-terminal — `org.jline %% jline-terminal` is declared at 3.29.0 in REDACTED, but 4.7.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 3.29.0 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.slf4j:slf4j-api — `org.slf4j %% slf4j-api` is declared at 2.0.16 in REDACTED, but 2.0.20 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 2.0.16 until the declaration is edited — there is no lockfile refresh that would move it.
Outdated: org.typelevel:cats-effect_3 — `org.typelevel %% cats-effect_3` is declared at 3.6.1 in REDACTED, but 3.7.1 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 3.6.1 until the declaration is edited — there is no lockfile refresh that would move it.
doc comments repeat the names src/main/resources/web/js/chat.js:264— 0 of 277 documented parameters and 2 of 1573 summaries in `nebflow-web` only repeat the member or parameter name (e.g. "Toggle mute." for `toggleMute`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 153 file(s) — `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkClient.scala`, `evidence/20261006_branch-cleanup-6verdicts/discofix-impl+discofix-impl2/src/main/scala/nebflow/neblink/NeblinkPresenceService.scala`, `evidence/20261006_branch-cleanup-6verdicts/explorerrt-impl/src/main/scala/nebflow/gateway/WebSocketRoutes.scala`, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/core/LlmLogWriter.scala`, `evidence/20261006_branch-cleanup-6verdicts/llmstallfix-impl/src/main/scala/nebflow/gateway/RestApiRoutes.scala`, … (+148 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e53e-0aed-732e-a6b1-87f73a51c701 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 194 · Warnings: 3284 · Recommendations: 156 · Info: 22 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 16:43 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.