Public report of LAION-AI/Open-Assistant, published 25 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 25 October 2026, 11:29 UTC Β· Survey ID cd_0d2d165c43844108b69b184d7dedd341

LAION-AI/Open-Assistant

Measured 25 October 2026, 11:25 UTC, at code version f1e6ed9

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 38out of 100 At risk No change since the last survey

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

A medium codebase: 57,109 lines of product code in 23 projects, tests not counted Β· Estimated rebuild effort: about 0.4 person-years Β· Weakest lens: Domain Modelling, 33

Findings by how serious they are

104 critical 478 serious 410 minor

11 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 11:25 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 Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

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

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 β–Έ

95of 95 dimensions measured by tools.
809of 992 findings point to an exact file and line, so you can open each one in the code. The other 183 concern the repository as a whole, such as missing documentation.
95dimensions across 8 lenses, read from 57,109 lines of product code in 23 projects.
Chapters

Executive summary

LAION-AI/Open-Assistant is rated At risk because critical security findings are open. It scores 38 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Domain Modelling, at 33, is the weakest lens, level with Production Readiness, and counts most in the score. The best first step for the work it takes is fixing the package under a licence on your banned list, worth about 2 points. Protecting the business objects' state would lift Domain Modelling itself, worth about 3 points. Raising Domain Modelling to 65 would lift the score to about 42.

Thirty-three settings leave the servers or containers unsafe. Twenty-seven known security holes in the packages the code depends on can be used by attackers. Correcting the unsafe settings and updating the vulnerable packages would close both risks. Pinning each tool to an exact version would fix the 25 pipeline tools referenced by a changeable name, and limiting each secret to its own step would deal with the seven secrets exposed to more of the pipeline than needed. Referring to the other business object by its identifier would take care of the two business objects holding another business object directly.

The product code is 57,109 lines, about €58,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Domain Modelling 33 Β· counts for 45%Production Readiness 33 Β· counts for 25%Accessibility 42 Β· counts for 14%Code Health 47 Β· counts for 8%Security and Compliance 53 Β· counts for 4%Maturity 70 Β· counts for 2%Architecture 89 Β· counts for 1%Performance 100 Β· counts for 1%

If Domain Modelling rose from 33 to 65, the lowest score rated Strong, the score would rise from 38 to about 42.

Code composition: what the lines of code are
Product code 97%Tests 3%
New since the last survey: 35 findings

These 35 critical or serious findings weren't in the previous survey, on 11 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 9 findings

These 9 critical or serious findings were in the previous survey, on 11 October 2026, and are gone from this one.

  • Secrets (history) Β· REDACTED: REDACTED notebooks/closed-book-qa/Closed Book QA Generator.ipynb
  • Secrets (history) Β· REDACTED: square-access-token notebooks/detoxify-evaluation/detoxify-evaluation.ipynb
  • Dependency Vulnerabilities Β· High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities Β· High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities Β· High CVE: [GHSA redacted] REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Outbound HTTP resilience Β· Outbound HTTP without resilience REDACTED
Rebuild cost: about €58,000 Β· Estimate
Cost to rebuild€19,000 to €96,000, for 319 to 1,012 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 38. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 57,109 lines of product code

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

Top priorities

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

1
Resolve the 1 Banned license finding(s) in License Compliance.
Raises the score by about 2 points Β· Low effort Β· License Compliance
2
Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
Raises the score by about 3 points Β· Medium effort Β· Encapsulated state
3
Resolve the 3 No assertions finding(s) in Test Quality β€” start with label_assistant_reply.cy.ts, label_initial_prompt.cy.ts, label_prompter_reply.cy.ts.
Raises the score by about 1 point Β· Low effort Β· Test Quality

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed Β· Value at risk
This code would cost about €58,000 to build again, about 0.4 person-years of work. Its weakest lens is Domain Modelling, at 33 (Weak). Domain Modelling is about whether the code protects the rules the business depends on. Because the weakest lens counts most in the score, work on Domain Modelling also moves the score most.
Based on: the rebuild estimate · the Domain Modelling grade · how much each lens counts
What to do: Start with the Domain Modelling actions in Top priorities.
One cause behind 17 Domain Modelling findings Β· Common cause
17 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Other code can change an object's data directly, so it can put an order into a state the rules forbid. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Encapsulated state (7 findings) · Rich vs anemic model (7 findings) · Strongly-typed ids (3 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first Β· First action
Resolve the 1 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 License Compliance findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture: which parts of the code depend on which

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

318 modules, with 153 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 278 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses β†’1 backend.oasst_backend.api.deps2 backend.oasst_backend.models.api_client3 backend.oasst_backend.models.db_payload4 backend.oasst_backend.models.message_tree_state5 backend.oasst_backend.models.payload_column_type6 backend.oasst_backend.models.user7 discord-bots.oa-bot-js.src.modules.inference.types8 inference.server.oasst_inference_server.models.chat9 inference.worker.interface10 model.model_training.custom_datasets.formatting11 website.src.components12 website.src.components.Messages13 website.src.types.Conversation14 website.src.types.Providers15 website.src.types.Task16 backend.oasst_backend.api17 backend.oasst_backend.models.message18 backend.oasst_backend.models.task19 backend.oasst_backend.user_repository20 inference.server.oasst_inference_server.user_chat_repository21 website.src.components.Tasks.Task.Task22 website.src.types.Chat23 website.src.types.Tasks24 website.src.types.Users25 backend.import26 backend.oasst_backend.api.v127 backend.oasst_backend.journal_writer28 backend.oasst_backend.prompt_repository29 backend.oasst_backend.task_repository30 backend.oasst_backend.utils31 inference.server.oasst_inference_server32 inference.server.oasst_inference_server.routes33 website.src.components.Chat34 website.src.components.Survey.TaskControls35 website.src.components.Tasks36 website.src.components.Tasks.LabelTask37 website.src.lib38 website.src.lib.oasst_api_client39 backend.oasst_backend.tree_manager40 website.src.components.Survey
1 backend.oasst_backend.api.deps
2 backend.oasst_backend.models.api_client
3 backend.oasst_backend.models.db_payload
4 backend.oasst_backend.models.message_tree_state
5 backend.oasst_backend.models.payload_column_type
6 backend.oasst_backend.models.user
7 discord-bots.oa-bot-js.src.modules.inference.types
8 inference.server.oasst_inference_server.models.chat
9 inference.worker.interface
10 model.model_training.custom_datasets.formatting
11 website.src.components
12 website.src.components.Messages
13 website.src.types.Conversation
14 website.src.types.Providers
15 website.src.types.Task
16 backend.oasst_backend.api11
17 backend.oasst_backend.models.message1
18 backend.oasst_backend.models.task1
19 backend.oasst_backend.user_repository11
20 inference.server.oasst_inference_server.user_chat_repository3
21 website.src.components.Tasks.Task.Task4
22 website.src.types.Chat3
23 website.src.types.Tasks7
24 website.src.types.Users1
25 backend.import21
26 backend.oasst_backend.api.v15101
27 backend.oasst_backend.journal_writer111
28 backend.oasst_backend.prompt_repository12111
29 backend.oasst_backend.task_repository1111
30 backend.oasst_backend.utils11
31 inference.server.oasst_inference_server1
32 inference.server.oasst_inference_server.routes1
33 website.src.components.Chat21
34 website.src.components.Survey.TaskControls11
35 website.src.components.Tasks22
36 website.src.components.Tasks.LabelTask11
37 website.src.lib12
38 website.src.lib.oasst_api_client21
39 backend.oasst_backend.tree_manager21
40 website.src.components.Survey1
Uses a module listed above itPart of a loopThe module itself
1 backend.oasst_backend.api.deps2 backend.oasst_backend.models.api_client3 backend.oasst_backend.models.db_payload4 backend.oasst_backend.models.message_tree_state5 backend.oasst_backend.models.payload_column_type6 backend.oasst_backend.models.user7 discord-bots.oa-bot-js.src.modules.inference.types8 inference.server.oasst_inference_server.models.chat9 inference.worker.interface10 model.model_training.custom_datasets.formatting11 website.src.components12 website.src.components.Messages13 website.src.types.Conversation14 website.src.types.Providers15 website.src.types.Task16 backend.oasst_backend.api17 backend.oasst_backend.models.message18 backend.oasst_backend.models.task19 backend.oasst_backend.user_repository20 inference.server.oasst_inference_server.user_chat_repository21 website.src.components.Tasks.Task.Task22 website.src.types.Chat23 website.src.types.Tasks24 website.src.types.Users25 backend.import26 backend.oasst_backend.api.v127 backend.oasst_backend.journal_writer28 backend.oasst_backend.prompt_repository29 backend.oasst_backend.task_repository30 backend.oasst_backend.utils31 inference.server.oasst_inference_server32 inference.server.oasst_inference_server.routes33 website.src.components.Chat34 website.src.components.Survey.TaskControls35 website.src.components.Tasks36 website.src.components.Tasks.LabelTask37 website.src.lib38 website.src.lib.oasst_api_client39 backend.oasst_backend.tree_manager40 website.src.components.Surveybackend.oasst_backend.api.deps1backend.oasst_backend.models.api_client2backend.oasst_backend.models.db_payload3backend.oasst_backend.models.message_tree_state4backend.oasst_backend.models.payload_column_type5backend.oasst_backend.models.user6discord-bots.oa-bot-js.src.modules.inference.types7inference.server.oasst_inference_server.models.chat8inference.worker.interface9model.model_training.custom_datasets.formatting10website.src.components11website.src.components.Messages12website.src.types.Conversation13website.src.types.Providers14website.src.types.Task15backend.oasst_backend.api16backend.oasst_backend.models.message17backend.oasst_backend.models.task18backend.oasst_backend.user_repository19inference.server.oasst_inference_server.user_chat_repository20website.src.components.Tasks.Task.Task21website.src.types.Chat22website.src.types.Tasks23website.src.types.Users24backend.import25backend.oasst_backend.api.v126backend.oasst_backend.journal_writer27backend.oasst_backend.prompt_repository28backend.oasst_backend.task_repository29backend.oasst_backend.utils30inference.server.oasst_inference_server31inference.server.oasst_inference_server.routes32website.src.components.Chat33website.src.components.Survey.TaskControls34website.src.components.Tasks35website.src.components.Tasks.LabelTask36website.src.lib37website.src.lib.oasst_api_client38backend.oasst_backend.tree_manager39website.src.components.Survey40111111343712151011111211111111111211122111221211+278 more modules (most-connected shown)

At a glance β€” Code Health Β· 47% Β· Adequate Β· gated by R2, X5 Β·

At a glance β€” Architecture Β· 89% Β· Exemplary Β·

At a glance β€” Maturity Β· 70% Β· Adequate Β· gated by D34 Β·

At a glance β€” Readiness Β· 33% Β· Weak Β· gated by R4, R5, P3, P7 Β·

At a glance β€” Security Β· 53% Β· Adequate Β· gated by D29, D30, D31, D32, D36 Β·

At a glance β€” Domain Modelling Β· 33% Β· Weak Β· gated by DM2, DM4, DM5 Β·

At a glance β€” Accessibility Β· 42% Β· Weak Β· gated by AC2, AC4 Β·

At a glance β€” Performance Β· 100% Β· Exemplary Β·

Security & Compliance β€” OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 β€” Software Supply Chain Failures62High / Critical
A02:2025 β€” Security Misconfiguration61High / Critical
A05:2025 β€” Injection59High / Critical
A01:2025 β€” Broken Access Control9Medium
A07:2025 β€” Authentication Failures4High / Critical

Roadmap

Begin by securing entity state through private setters and read-only collections, while migrating to strongly-typed identifiers to prevent argument errors. Shift business logic into the domain entities to enforce invariants at the source rather than relying on anemic services. Finally, increase test coverage by importing unreached modules and resolve the single banned license finding to ensure compliance.

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

Do thisHelpsEffortDimension
Resolve the 1 Banned license finding(s) in License Compliance.+2.4 ptsLowLicense Compliance
Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).+3.4 ptsMediumEncapsulated state
Resolve the 3 No assertions finding(s) in Test Quality β€” start with label_assistant_reply.cy.ts, label_initial_prompt.cy.ts, label_prompter_reply.cy.ts.+1.4 ptsLowTest Quality
Adopt strongly-typed ids across the domain β€” finish the migration or document the boundary; primitive ids invite transposed-argument bugs.+2.6 ptsMediumStrongly-typed ids
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.+2.6 ptsMediumRich vs anemic model
Add tests that import the unreached modules (directly or through their public entry).+2.6 ptsMediumTest Coverage
Improve Test Distribution β€” currently 7.1/10.+2.4 ptsMediumTest Distribution
Reference other aggregates by their strongly-typed id, never by object reference, so each aggregate stays an independent consistency boundary.+2.0 ptsMediumAggregate boundaries

File quality

Per-file score 0–10 β€” a quality signature. Of 171 files carrying findings, judged against the Preview bar: 7% slop Β· 23% mixed Β· 70% near-clean.

FileScoreBandWorst signal
REDACTED0.2SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.7SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.6SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.6SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.9SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.3MixedIaC & Container Security: High IaC: REDACTED
REDACTED3.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED

How the grades work

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

Critical β€” 104

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 β€” 478

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 β€” 410

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

Watchdog 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. 95 of 95 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 β€” the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory β€” an LLM prose judgement. 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; ◐ Sampled Β· advisory marks an LLM verdict over a bounded sample β€” advisory, never a deterministic measurement.

What we checked β€” 95 dimensions across the health lenses
D1D2D3D4D5D6D9D10D11D12D13D14D15D16D17D19D26D28D29D30D31D32D34D35D36D43D44AC2AC3AC4AC5AC6AC7AX10AX2AX3AX4AX6C2C4C5DM1DM11DM2DM4DM5DM9M1M2M3M4P1P10P2P3P4P5P6P7P8PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality β€” in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report β€” three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line β€” never an absolute scratch path. Here, 809 of 992 do; the remainder are repo-wide signals β€” a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it β€” Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled Β· advisory β€” not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score β€” and this report, byte for byte β€” is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) β€” re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0βœ“ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0βœ“ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0βœ“ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400βœ“ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400βœ“ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 Β· 0.31.0βœ“ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 Β· 0.69.3 Β· 3.2.533βœ“ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming β€” sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM Β· sampled Β· advisory

Every finding is locatable in findings.md. Run 01a172ce-ed23-72ae-a824-3a0ddbfa4083.

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

Run transparency β€” what happened this run

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

  • D8 Code Coverage β€” not measured this run β€” Watchdog 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 .ts, .tsx, .py, and our analyzer cannot run the .py test suite(s) β€” so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 66.7% β€” 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. In the meantime, produce a coverage report in a standard format (lcov β€” `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or `coverage run -m pytest` then `coverage xml`) and commit it β€” a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it β€” a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures β€” then both halves are read on the next scan.
  • D10 Test Quality β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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 26 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 18 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite β€” their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D14 License Compliance β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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 Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run β€” this says nothing about whether its names are consistent.
  • D22 Internal API Consistency β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • D27 Navigability β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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. `website/src/components/Messages/LabelYesNoGroup.tsx` 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.
  • AXR1 Runtime accessibility β€” not measured this run β€” Watchdog 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 DockerCompose (REDACTED). compose up failed (exit 1 β€” a container did not start, exited, or never became healthy) β€” no service selected; runtime evidence skipped.
  • C1 Data Protection β€” not measured this run β€” Watchdog 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.
  • DM8 Value-object opportunities β€” not measured this run β€” Watchdog 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 finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
  • GD1 Unfinished & placeholder code β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read 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.
  • IC1 Incompleteness & stubs β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read 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.
  • M4 Documentation accuracy β€” measured, with a gap in what it reached β€” Watchdog measured this, but not all of it. What it 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). 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.

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

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals β€” a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural β€” it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers β€” Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles β€” a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree β€” a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy β€” mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history β€” a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension β€” pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β€” undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β€” it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • 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 REDACTED, 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.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code β€” they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • 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.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only β€” an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • C4 Data Retention: This control is scored from in-repo evidence only β€” its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • C5 Data-Subject Rights: This control is scored from in-repo evidence only β€” absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body β€” a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present β€” it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β€” only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence β€” a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β€” controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 Β· Cyclomatic Complexity6.8 / 10Adequateβœ“ Tool-verified

What it measures: How tangled the control flow is β€” methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.8 / 10 Β· rule-coverage 100% Β· ceiling Prevented

44 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TreeManager.next_task at 47. A further 1 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 LabelLikertGroup.getLabelInfo at 19 β€” 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: website/src/components/Survey/LabelLikertGroup.tsx (LabelLikertGroup.getLabelInfo at 19). 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.

TreeManager.next_task (cyclomatic 47)backend/oasst_backend/tree_manager.py:408
ChatConversation.ChatConversation (cyclomatic 47)website/src/components/Chat/ChatConversation.tsx:35
custom_datasets.get_one_dataset (cyclomatic 44)model/model_training/custom_datasets/__init__.py:91
label.labelInteraction (cyclomatic 41)discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18
ChatMessageEntry.ChatMessageEntry (cyclomatic 37)website/src/components/Chat/ChatMessageEntry.tsx:46

+ 39 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 44 bodies over 15 down to 15 or less in Cyclomatic Complexity β€” start with TreeManager.next_task (cyclomatic 47), ChatConversation.ChatConversation (cyclomatic 47), custom_datasets.get_one_dataset (cyclomatic 44). β€” 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 44 together lifts Cyclomatic Complexity from 6.8 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D2 Β· Cognitive Complexity5.1 / 10Adequateβœ“ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.1 / 10 Β· rule-coverage 100% Β· ceiling Prevented

73 method(s) exceeded the cognitive complexity threshold of 15; the worst was TreeManager.next_task at 97.

TreeManager.next_task (cognitive 97)backend/oasst_backend/tree_manager.py:408
__main__.main (cognitive 89)text-frontend/__main__.py:28
label.labelInteraction (cognitive 83)discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18
auto_main.main (cognitive 70)text-frontend/auto_main.py:27
export.export_trees (cognitive 58)backend/export.py:169

+ 68 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cognitive Complexity β€” start with TreeManager.next_task (cognitive 97), __main__.main (cognitive 89), label.labelInteraction (cognitive 83). β€” 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 4 together lifts Cognitive Complexity from 5.1 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D3 Β· God Classes8.2 / 10Strongβœ“ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.2 / 10 Β· rule-coverage 100% Β· ceiling Prevented

23 god class(es) detected.

FunctionTooLong: ChatConversation.ChatConversation Β· Γ—16website/src/components/Chat/ChatConversation.tsx:35
FileTooLong: oasst_backend/prompt_repository.py Β· Γ—4backend/oasst_backend/prompt_repository.py
TooManyMethods: TreeManager Β· Γ—3backend/oasst_backend/tree_manager.py:152

What to do

  1. Resolve the 16 FunctionTooLong finding(s) in God Classes β€” start with [id].tsx (2), ChatConversation.tsx, label.ts. β€” One of this dimension's main actionable groups (16 warning-level).
  2. Resolve the 4 FileTooLong finding(s) in God Classes β€” start with prompt_repository.py, tree_manager.py, user_stats_repository.py. β€” One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 TooManyMethods finding(s) in God Classes β€” start with tree_manager.py, oasst_api_client.ts, prompt_repository.py. β€” One of this dimension's main actionable groups (3 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D4 Β· Code Duplication9.1 / 10Stronggated by 105 serious findingsβœ“ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.1 / 10 Β· rule-coverage 100% Β· ceiling Verified

101 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .tsx (22% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (7 lines × 2) Β· Γ—14backend/oasst_backend/api/v1/admin.py:242
Duplicated block (13 lines × 2) Β· Γ—6backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:41
Duplicated block (14 lines × 2) Β· Γ—5backend/export.py:75
Duplicated block (9 lines × 2) Β· Γ—5backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:207
Duplicated block (12 lines × 2) Β· Γ—4data/datasets/mt_note_generation/prepare.py:68

+ 51 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication β€” start with ranking.py (2), 2023_03_12_1742-7d5be54acd49_initial_revision.py (2), REDACTED (2). β€” One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 6 Duplicated block (13 lines × 2) finding(s) in Code Duplication β€” start with 2022_12_27_1444-3358eb6834e6_add_journal_table.py, users.py, user_stats_repository.py. β€” One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 5 Duplicated block (14 lines × 2) finding(s) in Code Duplication β€” start with database_utils.py (2), trainer_rl.py (2), export.py. β€” One of this dimension's main actionable groups (5 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D5 Β· Coupling10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type β€” the population is all types, not a name convention.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

5 production modules (npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d5_recommendation.md.

D6 Β· Cohesion (LCOM4)10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class β€” the population is all types, not a name convention.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

0 of 65 classes have LCOM4 above 3.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d6_recommendation.md.

D9 Β· Test Distribution7.1 / 10Strongβœ“ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 7.1 / 10 Β· rule-coverage 100% Β· ceiling Documented

62 test methods: 48 unit, 0 integration, 0 BDD, 14 e2e. The JavaScript/TypeScript suite contributes 26 `it`/`test` case(s) across 11 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 36 test function(s) across 13 file(s) declaring at least one β€” every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

What to do

  1. Improve Test Distribution β€” currently 7.1/10. β€” 62 test methods: 48 unit, 0 integration, 0 BDD, 14 e2e. The JavaScript/TypeScript suite contributes 26 `it`/`test` case(s) across 11 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 36 test function(s) across 13 file(s) declaring at least one β€” every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

Detailed fixes: d9_recommendation.md.

D10 Β· Test Quality8.3 / 10Strongβœ“ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.3 / 10 Β· rule-coverage 100% Β· ceiling Prevented

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

No assertions: completes the current task on submit and on request shows a new task Β· Γ—3website/cypress/e2e/tasks/label_assistant_reply.cy.ts:2

What to do

  1. Resolve the 3 No assertions finding(s) in Test Quality β€” start with label_assistant_reply.cy.ts, label_initial_prompt.cy.ts, label_prompter_reply.cy.ts. β€” One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D11 Β· Test Reliability10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

0 flaky across 2 measured tier(s). JavaScript/TypeScript (jest via `npm ci --ignore-scripts` in website/ (12 tests)): measured (0 flaky); Python (3 distributions): measured (0 flaky).

βœ“ On the Gold path β€” maintain.

Detailed fixes: d11_recommendation.md.

D12 Β· Dependency Hygiene8.0 6.7 / 10Adequateβœ“ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.7 / 10 Β· rule-coverage 84% Β· ceiling Verified

158 outdated, 0 yanked pinned Python distributions. 172 of 205 shipped distributions were graded against pypi.org (0 not published there, 33 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded β€” PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.

Outdated: aiohttp Β· Γ—158

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D13 Β· REDACTED Scanning10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

REDACTED scan ran and found no leaked secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d13_recommendation.md.

D14 Β· License Compliance8.0 / 10Adequategated by 1 critical findingβœ“ Tool-verified

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

1 of 364 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs β€” this repository's 205 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (159 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. β˜… This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 60 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. A further 2 direct requirement(s) are installed from a URL or a version-control checkout and publish no licence this pass can read; they are outside this verdict. β˜… COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass β€” a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: text-unidecode

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. β€” One of this dimension's main actionable groups (1 issue-level).
  2. Enforce License Compliance in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D15 Β· Churn × Complexity Hotspots10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Files that change often and are also complex β€” the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No churn × complexity hotspots in the window.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d15_recommendation.md.

D16 Β· Bus Factor10.0 / 10Exemplaryβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No source file's living knowledge is concentrated in a single author. Counted over 180 of the 362 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d16_recommendation.md.

D17 Β· Explicit Debt9.8 / 10Stronggated by 49 serious findingsβœ“ Tool-verified

What it measures: Acknowledged debt left in the code β€” TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.8 / 10 Β· rule-coverage 100% Β· ceiling Prevented

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

TodoComment Β· Γ—45website/src/pages/chat/index.tsx:27
HackComment Β· Γ—4website/src/components/MarkdownEditor.tsx:84

What to do

  1. Resolve the 45 TodoComment finding(s) in Explicit Debt β€” start with twitter_process_json.py (4), oasst_api_client.ts (3), ChatConversation.tsx (3). β€” One of this dimension's main actionable groups (45 warning-level).
  2. Resolve the 4 HackComment finding(s) in Explicit Debt β€” start with MarkdownEditor.tsx, indexed_dataset.py, trainer_rl.py. β€” One of this dimension's main actionable groups (4 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D19 Β· Documentation Quality10.0 / 10Exemplaryβ—‹ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d19_recommendation.md.

D26 Β· Project Cohesion6.9 / 10Adequateβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

4 of 23 build units (Python, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. β€” 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.

D28 Β· Secrets (history)7.0 / 10Adequategated by 3 critical findingsβœ“ Tool-verified

What it measures: Whether any secrets were ever committed β€” scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout β€” the full git history, then a second --no-git pass over the working tree as it stands β€” merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side β€” unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 7.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation β€” they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) β€” start with REDACTED, REDACTED. β€” One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D29 Β· Static Analysis (SAST)0.8 / 10Criticalβœ“ Tool-verified

What it measures: Real static-analysis (SAST) findings β€” likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files β€” exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.8 / 10 Β· rule-coverage 100% Β· ceiling Documented

59 finding(s): 0 critical, 34 high, 16 medium, 9 low. 25 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` β€” one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) β€” `REDACTED`, `website/src/components/Messages/LabelYesNoGroup.tsx` (line 60), `website/wait-for-postgres.sh` (line 15, line 19) β€” 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 1 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

+ 10 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (2), REDACTED, REDACTED. β€” One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (3 issue-level).
  3. No action in Static Analysis (SAST) β€” all 25 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 (25 issue-level, 0 of them charged here).

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

D30 Β· Dependency Vulnerabilities0.0 / 10Criticalβœ“ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares β€” Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no 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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

48 finding(s): 10 critical, 17 high, 21 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 14 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (12), REDACTED (2). β€” One of this dimension's main actionable groups (14 issue-level).
  2. Resolve the 10 Critical CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (10). β€” One of this dimension's main actionable groups (10 issue-level).
  3. Resolve the 3 High vulnerability finding(s) in Dependency Vulnerabilities β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 issue-level).

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

D31 Β· IaC & Container Security0.0 / 10Criticalβœ“ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

61 finding(s): 0 critical, 33 high, 23 medium, 5 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 33 High IaC finding(s) in IaC & Container Security β€” start with REDACTED (22), REDACTED (3), REDACTED (2). β€” One of this dimension's main actionable groups (33 issue-level).
  2. Resolve the 23 Medium IaC finding(s) in IaC & Container Security β€” start with REDACTED (4), REDACTED (3), REDACTED (2). β€” One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 5 Low IaC finding(s) in IaC & Container Security β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (5 recommendation-level).

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

D32 Β· Data Compliance (PII/GDPR)3.9 / 10Weakβœ“ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns β€” logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not β€” reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only β€” this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 3.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

9 finding(s): 0 critical, 0 high, 9 medium, 0 low. semgrep could not parse 1 file(s) β€” `website/src/components/Messages/LabelYesNoGroup.tsx` β€” so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED
REDACTED

What to do

  1. Resolve the 8 REDACTED finding(s) in Data Compliance (PII/GDPR) β€” start with REDACTED (8). β€” One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 warning-level).

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

D34 Β· Knowledge Freshness0.0 / 10Criticalβœ“ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned β€” last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

180 of 180 significant source file(s) are orphaned β€” their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 180 of the 362 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file Β· Γ—177model/model_training/models/prefix_llama.py:1
Most significant orphaned file Β· Γ—3REDACTED:1
Dormant codebase

What to do

  1. Resolve the 177 Orphaned file finding(s) in Knowledge Freshness β€” start with REDACTED (5), utils.py (4), REDACTED (4). β€” One of this dimension's main actionable groups (177 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness β€” start with REDACTED, tree_manager.py, prompt_repository.py. β€” One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D35 Β· Change Coupling9.7 / 10Stronggated by 9 serious findingsβœ“ Tool-verified

What it measures: Whether files that change together actually belong together β€” pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only β€” tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file β‰₯10 revisions, β‰₯5 shared commits, β‰₯50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only β€” test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair β€” a command and the reference page that restates it β€” is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.7 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: privacy-policy.tsx↔terms-of-service.tsx 83%; LeaderboardTable.tsx↔leaderboard.ts 70%; CreateTask.tsx↔EvaluateTask.tsx 67%

Change coupling: privacy-policy.tsx ↔ terms-of-service.tsx Β· Γ—8website/src/pages/privacy-policy.tsx:1
Change-coupling hub: TaskTypes.tsx β†’ label_assistant_reply.tsx, label_initial_prompt.tsx, label_prompter_reply.tsxwebsite/src/components/Tasks/TaskTypes.tsx

What to do

  1. Resolve the 8 Change coupling finding(s) in Change Coupling β€” start with privacy-policy.tsx, LeaderboardTable.tsx, CreateTask.tsx. β€” One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling β€” start with TaskTypes.tsx. β€” One of this dimension's main actionable groups (1 warning-level).

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

D36 Β· Supply-chain Provenance & Signing0.0 / 10Criticalβœ“ Tool-verified

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.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 4 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 issue-level).

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

D43 Β· Malicious Dependencies10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable β€” a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d43_recommendation.md.

D44 Β· Platform End-of-Life10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON β€” the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates β€” no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged β€” `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on β€” and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads β€” never scores it clean.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 Β· Forms & labels3.5 / 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 UI-library field component has no label / aria-label / aria-labelledby / id β€” and neither does anything it renders (a name prop is the form-submission key, not a label) β€” so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed. (×3) β€” website/src/components/Buttons/LikertButtons.tsx:18, website/src/components/Chat/ChatConfigForm.tsx:440, website/src/components/Chat/ChatMessageEntry.tsx:152
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content β€” so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed. (×4) β€” website/src/components/Chat/ChatConfigForm.tsx:190, website/src/components/LanguageSelector/LanguageSelector.tsx:45, website/src/components/Stats/Stats.components.tsx:172, …
  • This UI-library field component is named only by a placeholder β€” a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed. (×4) β€” website/src/components/Chat/ChatForm.tsx:49, website/src/components/Chat/CustomInstructions.tsx:68, website/src/components/Chat/CustomInstructions.tsx:80, …
  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> β€” the right fix for its keyboard operability β€” does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. β€” website/src/components/Sortable/SortableItem.tsx:64

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text β€” a placeholder is not a label.
AC3 Β· Page structure6.1 / 10Adequateβœ“ Tool-verified

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

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

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

  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels β€” increase by at most one. β€” website/src/components/Roadmap.tsx:13

What to do

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

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

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

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

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. β€” website/src/components/Sortable/SortableItem.tsx:64

What to do

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

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

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

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

AC6 Β· Visual & motion safety10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

AC7 Β· A11y enforcement4.0 / 10Weakβœ“ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration β€” lint config, test and CI files β€” NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found β€” no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 165 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files β€” matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with cypress-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 Β· Code composition8.3 / 10Strongβœ“ Tool-verified

Other Β· Architecture β€” How the codebase splits by code ROLE β€” domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER β€” domain, then infrastructure, then application β€” so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone β€” no declared namespace was available to add to the evidence β€” and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention β€” a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all β€” so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX2 Β· Stateful singletons10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

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

AX3 Β· Project dependency cycles10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 Β· Dependency direction10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) β€” the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 Β· Interface segregation10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Architecture β€” Whether interfaces stay focused rather than fat β€” the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count β€” members counted by name, so an overload group counts once β€” which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) β€” data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

C2 Β· Access Controls7.0 / 10Strongβœ“ Tool-verified

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

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

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) β€” this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.

What to do

  • Name the access rules β€” DRF permission classes, django-guardian or django-rules permissions, a casbin or oso policy, or roles and permissions declared once β€” and consult them where access is checked (permission_classes, @permission_required, Depends), so the rule set is reviewable and testable on its own.
C4 Β· Data Retention6.5 / 10Adequateβœ“ Tool-verified

Other Β· Security β€” Whether data has a defined lifetime β€” retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete β€” missing: an expiry limit β€” a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data β€” a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
C5 Β· Data-Subject Rights4.0 / 10Weakβœ“ Tool-verified

Other Β· Security β€” Whether GDPR data-subject requests are supported in code β€” erasure, export/portability, consent.

Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.

  • Corroborated rights: erasure βœ“ · export βœ— · consent βœ—. Each tick means this scan found code in the repository implementing that right β€” a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A βœ— therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.

What to do

  • Implement data export/portability for a data subject (a machine-readable export of their personal data).
  • Track GDPR consent (lawful basis) alongside the personal data it authorises.
DM1 Β· Aggregate boundaries4.6 / 10Adequateβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether aggregates reference each other by identity (id) rather than by direct object reference β€” the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set β€” a root not using those names is invisible.

  • `Message` references the aggregate root `User` directly (via `user`) β€” hold its `UserId` instead.
  • `DbReport` references the aggregate root `DbMessage` directly (via `message`) β€” hold its `DbMessageId` instead.

What to do

  • Reference other aggregates by their strongly-typed id, never by object reference, so each aggregate stays an independent consistency boundary.
DM11 Β· Constructible invalid state10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Domain Modelling β€” Whether an aggregate can be constructed in a state its own rules forbid β€” a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

DM2 Β· Strongly-typed ids3.0 / 10Weakβœ“ Tool-verified

Other Β· Domain Modelling β€” How much of the domain uses strongly-typed ids vs raw Guid/string/int β€” adoption curve, not all-or-nothing.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct β€” a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically β€” non-suffixed identifiers are not seen.

  • `Message.message_tree_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that. β€” backend/oasst_backend/models/message.py:18
  • `Message.api_client_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that. β€” backend/oasst_backend/models/message.py:18
  • `User.api_client_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that. β€” backend/oasst_backend/models/user.py:11

What to do

  • Adopt strongly-typed ids across the domain β€” finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
DM4 Β· Rich vs anemic model3.0 / 10Weakβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query β€” only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query β€” logic-bearing domain types outside the convention are invisible.

  • `Message` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” backend/oasst_backend/models/message.py:18
  • `TrollStats` is an aggregate/entity with 22 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” backend/oasst_backend/models/troll_stats.py:10
  • `User` is an aggregate/entity with 14 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” backend/oasst_backend/models/user.py:11
  • `UserStats` is an aggregate/entity with 19 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” backend/oasst_backend/models/user_stats.py:18
  • `DbMessage` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” inference/server/oasst_inference_server/models/chat.py:11
  • `DbChat` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” inference/server/oasst_inference_server/models/chat.py:77
  • `DbReport` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service. β€” inference/server/oasst_inference_server/models/chat.py:120

What to do

  • Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
DM5 Β· Encapsulated state1.0 / 10Criticalβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether entities protect their state β€” private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection β€” instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state β€” public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

  • `Message` exposes publicly writable state (id, parent_id, message_tree_id, task_id, user_id, role, and 18 more). β€” backend/oasst_backend/models/message.py:18
  • `TrollStats` exposes publicly writable state (time_frame, user_id, base_date, troll_score, modified_date, rank, and 16 more). β€” backend/oasst_backend/models/troll_stats.py:10
  • `User` exposes publicly writable state (id, username, auth_method, display_name, created_date, api_client_id, and 8 more). β€” backend/oasst_backend/models/user.py:11
  • `UserStats` exposes publicly writable state (time_frame, user_id, base_date, leader_score, modified_date, rank, and 13 more). β€” backend/oasst_backend/models/user_stats.py:18
  • `DbMessage` exposes publicly writable state (role, id, created_at, chat_id, chat, reports, and 16 more). β€” inference/server/oasst_inference_server/models/chat.py:11
  • `DbChat` exposes publicly writable state (id, user_id, created_at, modified_at, title, messages, and 3 more). β€” inference/server/oasst_inference_server/models/chat.py:77
  • `DbReport` exposes publicly writable state (id, message_id, message, report_type, reason). β€” inference/server/oasst_inference_server/models/chat.py:120

What to do

  • Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
DM9 Β· Scattered domain decisions10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether one domain rule is decided β€” or one measurement produced β€” in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type β€” operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of β‰₯2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own β€” the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

M1 Β· Documentation (README)8.7 / 10Exemplaryβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo and its projects have a README, and whether it's substantive and current.

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.
  • Add an 'Architecture' / 'How it works' section to the root README β€” the high-level shape.
M2 Β· Architecture documentation5.0 / 10Adequateβœ“ Tool-verified

Maturity Β· Maturity β€” Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found β€” no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 Β· Folder & project structure8.0 / 10Strongβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo is organised deliberately β€” src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Production code isn't grouped under a src/ folder β€” it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 Β· Documentation accuracy10.0 / 10Exemplaryβ—‹ Nothing flagged

Maturity Β· Maturity β€” Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 Β· CI/CD gates10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

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

P2 Β· Observability8.9 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Readiness β€” Whether the code is diagnosable in production β€” structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 11/17 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `data/datasets/biostars_qa`, `data/datasets/iapp_wiki_qa_squad`, `data/datasets/logicreference_OA`, `model/model_eval/manual`, `model/pretokenizer` and 1 more.
  • `website/src/pages/api/report.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/report.ts:18
  • `website/src/pages/api/set_label.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/set_label.ts:33
  • `website/src/pages/api/update_task.ts` reports through `console.*` at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/update_task.ts:56
  • `website/src/pages/api/new_task/[task_type].ts` reports through `console.*` at line 31 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/new_task/[task_type].ts:31
  • `website/src/pages/api/messages/[id]/emoji.ts` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/messages/[id]/emoji.ts:22
  • `website/src/pages/api/account/delete.ts` reports through `console.*` at line 50 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/api/account/delete.ts:50
  • `website/src/pages/account/delete.tsx` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/account/delete.tsx:24
  • `website/src/pages/account/edit.tsx` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/account/edit.tsx:47
  • `website/src/pages/account/paperack.tsx` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/pages/account/paperack.tsx:27
  • `website/src/lib/chat_stream.ts` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/lib/chat_stream.ts:59
  • `website/src/lib/chat_stream.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/lib/chat_stream.ts:62
  • `website/src/lib/oasst_inference_client.ts` reports through `console.*` at line 132 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/lib/oasst_inference_client.ts:132
  • `website/src/hooks/tasks/useGenericTaskAPI.tsx` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/hooks/tasks/useGenericTaskAPI.tsx:51
  • `website/src/components/Tasks/Task/Task.tsx` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/components/Tasks/Task/Task.tsx:143
  • `website/src/components/Chat/ChatConversation.tsx` reports through `console.*` at line 255 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. β€” website/src/components/Chat/ChatConversation.tsx:255

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 Β· Security & performance tooling3.0 / 10Weakβœ“ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 18306 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen β€” if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack β€” so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `github-actions`, `pip` β€” add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 Β· Deployment & Rollback8.0 / 10Strongβœ“ Tool-verified

Readiness Β· Readiness β€” Whether releases are automated and safely reversible (probes, rolling updates, approval gates) β€” from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • The pipeline declares a deployment environment, but whether required reviewers / protection rules are attached to it lives in repository settings we cannot read β€” confirm the gate is enforced before production promotion.
P5 Β· DR & Backup7.0 / 10Strongβœ“ Tool-verified

Readiness Β· Readiness β€” Whether disaster recovery is planned and codified β€” backups, geo-recovery, RTO/RPO, persistence guarantees β€” from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 Β· Release Hygiene5.0 / 10Adequateβœ“ Tool-verified

Readiness Β· Readiness β€” Whether releases are traceable β€” a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 Β· Outbound HTTP resilience3.0 / 10Weakβœ“ Tool-verified

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

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

  • `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout. (×4) β€” backend/oasst_backend/api/v1/login.py:30, backend/oasst_backend/utils/hugging_face.py:52, REDACTED:116, …
  • `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout. (×7) β€” backend/oasst_backend/utils/discord.py:52, inference/worker/chat_chain_utils.py:215, inference/worker/utils.py:265, …
  • `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout. (×16) β€” data/datasets/biostars_qa/get_biostars_dataset.py:44, data/datasets/oa_dolly_15k/create_dataset.py:12, data/datasets/oa_stackexchange/download.py:30, …
  • `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout. β€” REDACTED:41
  • `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout. β€” REDACTED:327

What to do

  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
P8 Β· Schema migrations10.0 / 10Exemplaryβ—‹ Nothing flagged

Readiness Β· Readiness β€” Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 Β· Async & latency hygiene10.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Performance β€” Whether asynchronous code stays responsive β€” it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere β€” .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect β€” and, for a .NET library with β‰₯5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 Β· Type Safety9.7 / 10Exemplaryβœ“ Tool-verified

React / JS Β· Code Health β€” How much of the frontend is typed TypeScript vs untyped JavaScript.

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

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 Β· Code Duplication7.2 / 10Strongβœ“ Tool-verified

React / JS Β· Code Health β€” Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.

  • discord-bots/oa-bot-js/src/interactions/tasks.ts:223 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:171 β€” 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. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:223
  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:48 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:69 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:98 β€” 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. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:48
  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:360 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:118 β€” 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. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:360
  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:269 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:308 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:326 β€” 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. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:269
  • discord-bots/oa-bot-js/src/interactions/tasks.ts:57 · discord-bots/oa-bot-js/src/interactions/tasks.ts:74 · discord-bots/oa-bot-js/src/interactions/tasks.ts:132 β€” all 3 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:57
  • discord-bots/oa-bot-js/src/interactions/tasks.ts:152 · discord-bots/oa-bot-js/src/interactions/tasks.ts:277 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:152
  • discord-bots/oa-bot-js/src/interactions/vote.ts:31 · discord-bots/oa-bot-js/src/interactions/vote.ts:45 β€” 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. β€” discord-bots/oa-bot-js/src/interactions/vote.ts:31
  • discord-bots/oa-bot-js/src/interactions/tasks.ts:88 · discord-bots/oa-bot-js/src/interactions/tasks.ts:152 · discord-bots/oa-bot-js/src/interactions/tasks.ts:273 β€” all 3 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:88
  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions/info.ts:52 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/init.ts:28 β€” 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. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/info.ts:52
  • discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:2 · discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:14 β€” 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. β€” discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:2
  • discord-bots/oa-bot-js/src/interactions/tasks.ts:118 · discord-bots/oa-bot-js/src/interactions/tasks.ts:130 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:118
  • discord-bots/oa-bot-js/src/interactions/tasks.ts:197 · discord-bots/oa-bot-js/src/interactions/tasks.ts:241 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:197
  • discord-bots/oa-bot-js/src/handlers/commands.ts:13 · discord-bots/oa-bot-js/src/handlers/events.ts:9 β€” 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. β€” discord-bots/oa-bot-js/src/handlers/commands.ts:13
  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:60 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:90 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:60
  • discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:82 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:88 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:94 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:100 β€” all 4 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. β€” discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:82

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.
R2 Β· Cyclomatic Complexity3.8 / 10Weakβœ“ Tool-verified

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

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

  • execute has cyclomatic complexity 30 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. β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:41
  • labelInteraction has cyclomatic complexity 27 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18
  • execute has cyclomatic complexity 16 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β€” discord-bots/oa-bot-js/src/events/messages.ts:34
  • execute has cyclomatic complexity 14 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β€” discord-bots/oa-bot-js/src/commands/chat.ts:61
  • labelText has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β€” arms side by side rather than stacked β€” and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β€” discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:66
  • getLabels has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β€” arms side by side rather than stacked β€” and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β€” discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:114

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≀ 5.
R3 Β· Large Files10.0 / 10Exemplaryβœ“ Tool-verified

React / JS Β· Code Health β€” How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

R4 Β· Test Coverage0.0 / 10Criticalβœ“ 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.

  • 0% of 31 production file(s) reachable from 0 test file(s) via the import graph β€” 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 Β· Dependency Freshness2.0 / 10Weakβœ“ Tool-verified

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

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

  • 89 outdated package(s); JS/npm CVEs scored in D30

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
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.

R7 Β· Dead Code7.4 / 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.

  • 2 file(s) (~53 LoC) were excluded from dead-code analysis β€” declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
  • Unreachable from the 12 application, 1 tooling and 0 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 (12 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (discord-bots/oa-bot-js/src/bot.ts) β€” every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) β€” discord-bots/oa-bot-js/src/handlers/commands.ts, discord-bots/oa-bot-js/src/handlers/interactions.ts, discord-bots/oa-bot-js/src/handlers/events.ts
  • no import path from any entry point (12 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it β€” nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) β€” discord-bots/oa-bot-js/src/bot.ts, discord-bots/oa-bot-js/src/modules/inference/index.ts
  • Nothing imports this binding β€” it is safe to review for removal. (×4) β€” discord-bots/oa-bot-js/src/modules/inference/types.ts:14, discord-bots/oa-bot-js/src/modules/inference/types.ts:47, discord-bots/oa-bot-js/src/modules/inference/types.ts:73, …
  • 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. β€” discord-bots/oa-bot-js/src/commands/chat.ts:190

What to do

  • Delete the dead files and unused exports β€” every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 Β· Dependency Hygiene10.0 / 10Exemplaryβœ“ Tool-verified

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

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

R9 Β· Circular Imports8.1 / 10Strongβœ“ Tool-verified

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

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

  • discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/tasks.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts (one verified cycle inside a mutually-dependent group of 4 files) β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts:1

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 Β· Web-Security Posture8.0 / 10Strongβœ“ Tool-verified

Other Β· Security β€” Only what this repository's own non-C# files could be read for was assessed β€” and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

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

  • 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 configured β€” defense in depth, even when a reverse proxy could set them. This is reported because `REDACTED` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (βˆ’2.0 on this card.) β€” deploy/prod2-node/nginx/nginx.conf:3

What to do

  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first β€” it is what contains an injected script once one reaches the page β€” followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
X1 Β· Async correctness10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X12 Β· Unreachable branch10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

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.

X14 Β· Bypassable address classification10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

X15 Β· Unvalidated length from an untrusted reader10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Security β€” Whether a length read out of the stream being parsed is bounded before it is allocated or read β€” an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 Β· Unfloored truncation loop10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X17 Β· Uncapped recursion over a caller-supplied document10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

X18 Β· Disposal-pattern correctness10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X19 Β· Unrestored process-global state10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

X2 Β· Cancellation propagation6.0 / 10Adequateβœ“ Tool-verified

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 1/3 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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.
  • `checkCaptcha` 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 })`. β€” website/src/lib/captcha.ts:20
  • `getTranlation` 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 })`. β€” discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:1

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 Β· Side-effecting pattern guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X22 Β· Contradicted release guard10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies β€” reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 Β· Unguarded diagnostic materialisation10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X24 Β· Document value interpolated into markup unescaped10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

X25 Β· Inert configuration knob10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X26 Β· Unsynchronised callback handoff10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed β€” a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it β€” and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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.

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

X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X29 Β· Per-element action decided by a fixed element10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X3 Β· Exception handling6.9 / 10Strongβœ“ Tool-verified

Other Β· Code Health β€” Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

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

  • An empty catch block silently discards the error β€” failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×6) β€” oasst-shared/oasst_shared/schemas/inference.py:64, oasst-shared/oasst_shared/schemas/inference.py:113, inference/worker/work.py:301, …
  • `except 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. β€” inference/worker/work.py:182

What to do

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

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

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

X4 Β· Structured logging4.1 / 10Weakβœ“ Tool-verified

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.

  • `info` at line 25 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. β€” website/src/pages/api/account/delete.ts:25
  • `info` at line 34 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. β€” website/src/pages/api/account/delete.ts:34
  • `info` at line 39 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. β€” website/src/pages/api/account/delete.ts:39
  • `info` at line 48 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. β€” website/src/pages/api/account/delete.ts:48
  • `error` at line 40 is handed an f-string as its message, 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 record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. β€” data/datasets/nsfw_selfharm_reddit/utils/reddit.py:40
  • `error` at line 77 is handed an f-string as its message, 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 record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. β€” data/datasets/nsfw_selfharm_reddit/utils/reddit.py:77

What to do

  • Interpolated log message defeats structured logging
X5 Β· Nullable reference types1.8 / 10Criticalβœ“ Tool-verified

Other Β· Code Health β€” Whether strict null checking is enabled and not undermined by heavy `!` assertion β€” TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

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

  • 0/3 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~2.0 `!` null assertions per 1k TypeScript source lines β€” 41 assertion(s) across the 20766 source line(s) of the 324 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: website/src/components/Messages/LabelInputGroup.tsx (10), website/src/components/Chat/ChatConversation.tsx (6), website/src/components/Chat/ChatConfigForm.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off β€” `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family β€” and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage β€” what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; β‰ˆ24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim β€” a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 Β· Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 Β· Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 Β· Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 Β· ARIA correctness4.1.2Partial signal
AC6 Β· Visual & motion safety1.4.3, 2.4.7Partial β€” literal CSS only
AC7 Β· A11y enforcementenforcement β€” no page criterionEnforcement posture (process)

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

Reference β€” by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health47%Adequate β€” gated by R2, X5Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture89%ExemplarySolid.
Maturity70%Adequate β€” gated by D34Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Readiness33%Weak β€” gated by R4, R5, P3, P7Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Security53%Adequate β€” gated by D29, D30, D31, D32, D36Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Domain Modelling33%Weak β€” gated by DM2, DM4, DM5Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Accessibility42%Weak β€” gated by AC2, AC4Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored β€” 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score β€” either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate β€” 10 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
  • X7 Silent fallback defaults β€” 1 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
Not 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.

  • C3 Audit Trail β€” Repo shows no audit-logging mechanism (an audit-log table or model β€” a class or table named for it β€” django-simple-history, django-auditlog, django-reversion, django-pghistory or SQLAlchemy-Continuum recording each change, or an event-sourced store beside one) for sensitive changes β€” absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
Not included β€” 45 check(s) not relevant to this codebase

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

  • AC1 Text alternatives β€” No image/media element found in the parsed markup β€” AC1 not applicable here.
  • AX1 Captive dependencies β€” Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's.
  • 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 β€” compose up failed (exit 1 β€” a container did not start, exited, or never became healthy) β€” no service selected; 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.
  • 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.
  • D20 ADR Quality β€” N/A β€” ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency β€” Naming consistency is measured on C# only; JavaScript, Python, TypeScript not measured.
  • D22 Internal API Consistency β€” API consistency is measured on C# only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling β€” No bounded-context organisation was detected either β€” neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (inference), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (β‰₯2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it β€” e.g. `architecture:` β†’ `contexts:` β†’ `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value β€” D24 reads C# and Visual Basic comments only β€” this repository's production source is .py, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance β€” no ADRs to check
  • D27 Navigability β€” D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), 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.
  • 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.
  • D39 IL Efficiency β€” D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement β€” No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity β€” no checkable ADRs, and no project-reference graph for the cycle pass to read β€” so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage β€” Coverage not measured β€” polyglot repository, one half has no runner
  • DM10 One transaction, one aggregate β€” no repository writes detected β€” no operation to judge against the one-aggregate rule
  • DM12 Ambient inputs in the domain β€” no domain-layer types detected β€” ambient-input check not applicable
  • DM3 Integration-event coupling β€” no integration events detected β€” coupling check not applicable
  • DM6 Domain ↔ infrastructure boundary β€” no domain-layer types detected β€” domain↔infrastructure boundary check not applicable
  • DM7 Repository granularity β€” no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities β€” not scored β€” the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show 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
  • GD1 Unfinished & placeholder code β€” no source files were read β€” this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs β€” 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
  • P12 CI test-gate honesty β€” Reported, not scored β€” and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P9 Domain vs controller coverage β€” coverage data present for 14 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 a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, 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 applicable: Python and TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path β€” no pools, stack allocation or value types β€” so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries β€” No recognizable feature-sliced/layered src layout β€” boundary rules not applicable.
  • SC1 Supply-chain hygiene β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard β€” This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception β€” .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly β€” This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A β€” Findings (grouped)

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

Critical β€” 104 finding(s)
D31 Β· IaC & Container Security Β· High IaC Β· Γ—33
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 8 more in this group β€” see findings.md.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· High CVE Β· Γ—14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Critical CVE Β· Γ—10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· High vulnerability Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D28 Β· Secrets (history) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
DM1 Β· Aggregate boundaries Β· Aggregate holds a reference to another aggregate Β· Γ—2
  • Aggregate holds a reference to another aggregate: Message.user β€” `Message` references the aggregate root `User` directly (via `user`) β€” hold its `UserId` instead.
  • Aggregate holds a reference to another aggregate: DbReport.message β€” `DbReport` references the aggregate root `DbMessage` directly (via `message`) β€” hold its `DbMessageId` instead.
AC2 Β· Forms & labels Β· Custom control with no accessible name on <div> Β· Γ—1
  • Custom control with no accessible name on <div> website/src/components/Sortable/SortableItem.tsx:64 β€” This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> β€” the right fix for its keyboard operability β€” does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 Β· Keyboard semantics Β· Click handler on a non-interactive <div> Β· Γ—1
  • Click handler on a non-interactive <div> website/src/components/Sortable/SortableItem.tsx:64 β€” A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D14 Β· License Compliance Β· Banned license Β· Γ—1
  • Banned license: text-unidecode β€” `text-unidecode` 1.3 is published on PyPI under `GPL-2.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository β€” so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
D28 Β· Secrets (history) Β· High secret Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing REDACTED Β· Γ—1
  • REDACTED
R9 Β· Circular Imports Β· Import cycle (3 files) Β· Γ—1
  • Import cycle (3 files) discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts:1 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/tasks.ts β†’ discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts (one verified cycle inside a mutually-dependent group of 4 files)
Serious β€” 478 finding(s)
D17 Β· Explicit Debt Β· TodoComment Β· Γ—45
  • TodoComment website/src/pages/chat/index.tsx:27 β€” // TODO: enable this after visually differentiating hidden from visible chats & allowing 'unhide' β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/pages/api/set_label.ts:8 β€” // TODO: move to oasst_api_client β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/pages/api/auth/[...nextauth].ts:155 β€” // TODO(#236): Reduce the number of times we update the role field.
  • TodoComment website/src/pages/api/auth/[...nextauth].ts:193 β€” // TODO avoid duplicate logic with the signIn event β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/lib/leaderboard_utilities.ts:26 β€” // TODO: Check why there is no image for a better fix β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/lib/oasst_api_client.ts:125 β€” // TODO return a strongly typed Task? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/lib/oasst_api_client.ts:144 β€” // TODO return a strongly typed Task? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/lib/oasst_api_client.ts:441 β€” // TODO: add update-able fields eg: enabled, notes, show_on_leaderboard, etc.. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Messages/AdminMessageTable.tsx:43 β€” // TODO move this to somewhere β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Messages/PluginUsageDetails.tsx:6 β€” // TODO: Delete me! β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/DataTable/DataTable.tsx:56 β€” // TODO: move to meta β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/DataTable/DataTable.tsx:59 β€” // TODO: stricter type β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Chat/ChatConversation.tsx:249 β€” // TODO: maybe at some point we won't need to access the rendered HTML directly, but use react state β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Chat/ChatConversation.tsx:349 β€” // TODO maybe we should trigger a toast or something β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Chat/ChatConversation.tsx:394 β€” // TODO consider to trigger notification β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment website/src/components/Chat/ChatConversationTree.tsx:114 β€” // TODO refacor away from this dirty hack β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/data-collection/twitter/twitter_create_convs.py:8 β€” # TODO: Source paths from env file β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/data-collection/twitter/twitter_process_json.py:32 β€” # TODO: Source paths from env file β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/data-collection/twitter/twitter_process_json.py:27 β€” # TODO: OPTIONAL - Put the Untar process in a script instead of doing that part externally. Twitterstream archives are .tar with folders and json.gz files inside. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/data-collection/twitter/twitter_process_json.py:28 β€” # TODO: Set up list of important hashtags & keywords. This might have to be done after we get the original tweets in a separate file. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/data-collection/twitter/twitter_process_json.py:29 β€” # TODO: Process data and filter based on hashtags & keywords β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment oasst-shared/tests/test_oasst_api_client.py:21 β€” # TODO The fixture should close this connection, but there seems to be a bug β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment oasst-shared/oasst_shared/api_client.py:15 β€” # TODO: Move to `protocol`? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment model/model_training/utils/ppo_utils.py:50 β€” # TODO change freeze_layer parameter here .. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment model/model_training/utils/ppo_utils.py:108 β€” # TODO: Optimize this to avoid wasting RAM β€” 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.
  • + 20 more in this group β€” see findings.md.
P7 Β· Outbound HTTP resilience Β· Outbound HTTP without resilience Β· Γ—29
  • Outbound HTTP without resilience backend/oasst_backend/api/v1/login.py:30 β€” `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/oasst_backend/utils/discord.py:52 β€” `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/oasst_backend/utils/hugging_face.py:52 β€” `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/biostars_qa/get_biostars_dataset.py:44 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/oa_dolly_15k/create_dataset.py:12 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/oa_stackexchange/download.py:30 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/oa_stackexchange/download.py:53 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:41 β€” `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:77 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/zhihu-kol/main.py:44 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/zhihu-kol/main.py:151 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience data/datasets/zhihu-kol/scrape_by_topic.py:49 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:116 β€” `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/chat_chain_utils.py:208 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/chat_chain_utils.py:215 β€” `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/openapi_parser.py:11 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/openapi_parser.py:32 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/utils.py:261 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience inference/worker/utils.py:265 β€” `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience model/model_training/custom_datasets/prompt_dialogue.py:37 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:327 β€” `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:695 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience oasst-shared/oasst_shared/api_client.py:47 β€” `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/data_augment/data_augment.py:147 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/data_augment/data_augment.py:248 β€” `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β€” or never, for a client with no default timeout.
  • + 4 more in this group β€” see findings.md.
D31 Β· IaC & Container Security Β· Medium IaC Β· Γ—23
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Medium CVE Β· Γ—20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 Β· God Classes Β· FunctionTooLong Β· Γ—16
  • FunctionTooLong: ChatConversation.ChatConversation website/src/components/Chat/ChatConversation.tsx:35 β€” FunctionTooLong β€” ChatConversation runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.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: label.labelInteraction discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18 β€” FunctionTooLong β€” labelInteraction runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× 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: AdminMessageTable.AdminMessageTable website/src/components/Messages/AdminMessageTable.tsx:54 β€” FunctionTooLong β€” AdminMessageTable runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: PluginsChooser.PluginsChooser website/src/components/Chat/PluginsChooser.tsx:45 β€” FunctionTooLong β€” PluginsChooser runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: privacy-policy.PrivacyPolicy website/src/pages/privacy-policy.tsx:7 β€” FunctionTooLong β€” PrivacyPolicy 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: LabelLikertGroup.getLabelInfo website/src/components/Survey/LabelLikertGroup.tsx:22 β€” FunctionTooLong β€” getLabelInfo 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: ChatMessageEntry.ChatMessageEntry website/src/components/Chat/ChatMessageEntry.tsx:46 β€” FunctionTooLong β€” ChatMessageEntry runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: Task.Task website/src/components/Tasks/Task/Task.tsx:67 β€” FunctionTooLong β€” Task runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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: ChatAssistantDraftViewer.ChatAssistantDraftViewer website/src/components/Chat/ChatAssistantDraftViewer.tsx:20 β€” FunctionTooLong β€” ChatAssistantDraftViewer runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: ChatListItem.ChatListItem website/src/components/Chat/ChatListItem.tsx:35 β€” FunctionTooLong β€” ChatListItem runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: PluginUsageDetails.DropdownItem website/src/components/Messages/PluginUsageDetails.tsx:13 β€” FunctionTooLong β€” DropdownItem runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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: MessageTableEntry.MessageActions website/src/components/Messages/MessageTableEntry.tsx:203 β€” FunctionTooLong β€” MessageActions runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.StatusIndex website/src/pages/admin/status/index.tsx:29 β€” FunctionTooLong β€” StatusIndex runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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: ChatConfigForm.ChatConfigForm website/src/components/Chat/ChatConfigForm.tsx:106 β€” FunctionTooLong β€” ChatConfigForm runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: [id].MessageDetail website/src/pages/admin/messages/[id].tsx:28 β€” FunctionTooLong β€” MessageDetail runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: [id].EditMessage website/src/pages/admin/edit/[id].tsx:37 β€” FunctionTooLong β€” EditMessage runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 2) Β· Γ—14
  • Duplicated block (7 lines × 2) backend/oasst_backend/api/v1/admin.py:242 β€” backend/oasst_backend/api/v1/admin.py:242-248 | backend/oasst_backend/api/v1/messages.py:139-145 β€” 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 `backend/oasst_backend/api/v1/admin.py:242` 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) backend/oasst_backend/config.py:221 β€” backend/oasst_backend/config.py:221-227 | inference/server/oasst_inference_server/settings.py:59-65 β€” 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 `backend/oasst_backend/config.py:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `values` to `Dict[str, Any]` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) backend/oasst_backend/utils/ranking.py:7 β€” backend/oasst_backend/utils/ranking.py:7-13 | scripts/postprocessing/rankings.py:7-13 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/oasst_backend/utils/ranking.py:15 β€” backend/oasst_backend/utils/ranking.py:15-21 | scripts/postprocessing/rankings.py:15-21 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:69 β€” inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:69-79 | inference/server/alembic/versions/2023_03_22_2113-78f16015b904_add_refresh_token_table.py:25-31 β€” 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 `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py: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. 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 × 2) inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:148 β€” inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:148-154 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:157-163 β€” 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, `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:164` calls `drop_index` and `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:155` 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 × 2) inference/server/oasst_inference_server/chat_repository.py:23 β€” inference/server/oasst_inference_server/chat_repository.py:23-29 | inference/server/oasst_inference_server/chat_repository.py:32-38 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) inference/server/oasst_inference_server/user_chat_repository.py:154 β€” inference/server/oasst_inference_server/user_chat_repository.py:154-161 | inference/server/oasst_inference_server/user_chat_repository.py:229-235 β€” 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 `inference/server/oasst_inference_server/user_chat_repository.py:154` 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 lines × 2) REDACTED:574 β€” REDACTED:574-580 | REDACTED:644-650 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:573` calls `compile` and `REDACTED:643` 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 × 2) REDACTED:571 β€” REDACTED:571-577 | REDACTED:605-611 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) model/model_training/models/patching_llama.py:108 β€” model/model_training/models/patching_llama.py:108-114 | model/model_training/models/prefix_llama.py:253-259 β€” 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, `model/model_training/models/prefix_llama.py:249` calls `max`, `tensor`, `finfo` and `model/model_training/models/patching_llama.py:104` 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 × 2) model/model_training/tools/sample_rm_data.py:48 β€” model/model_training/tools/sample_rm_data.py:48-54 | model/model_training/tools/sample_rm_data.py:69-75 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) backend/alembic/versions/2023_01_26_1835-c84fcd6900dc_add_task_created_date_index.py:19 β€” backend/alembic/versions/2023_01_26_1835-c84fcd6900dc_add_task_created_date_index.py:19-25 | backend/alembic/versions/2023_02_14_1756-165b55de5a94_add_text_labels_message_id_index.py:19-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.
  • Duplicated block (7 lines × 2) model/model_training/custom_datasets/__init__.py:82 β€” model/model_training/custom_datasets/__init__.py:82-88 | model/model_training/utils/utils.py:422-428 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D32 Β· Data Compliance (PII/GDPR) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 Β· Change Coupling Β· Change coupling Β· Γ—8
  • Change coupling: privacy-policy.tsx ↔ terms-of-service.tsx website/src/pages/privacy-policy.tsx:1 β€” `website/src/pages/privacy-policy.tsx` and `website/src/pages/terms-of-service.tsx` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module β€” a sibling reference still needs an import β€” so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `e7cf8283` Replace fonts loaded via stylesheet with use of next/font (#2600); `323432c1` update LAION's address; `6c01205b` Small website fixes β€” run `git show` on any of them.
  • Change coupling: LeaderboardTable.tsx ↔ leaderboard.ts website/src/components/LeaderboardTable/LeaderboardTable.tsx:1 β€” `website/src/components/LeaderboardTable/LeaderboardTable.tsx` and `website/src/pages/api/leaderboard.ts` change together 70% of the time (7 of the 10 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 `bcb2d448` Show correct discord avatar on leaderboard (#1955); `5d10b28b` fix leaderboard when current user doesn't have stats (#1289); `952e021c` Show current user rank in leaderboard (#1263) β€” run `git show` on any of them.
  • Change coupling: CreateTask.tsx ↔ EvaluateTask.tsx website/src/components/Tasks/CreateTask.tsx:1 β€” `website/src/components/Tasks/CreateTask.tsx` and `website/src/components/Tasks/EvaluateTask.tsx` change together 67% of the time (14 of the 21 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 14 shared commits counted here, the most recent 3 are `aaa1276b` Admin user management (#1393); `ae829d0e` update tasks to use types; `e0e398fa` website: Improve reliability of e2e tests β€” run `git show` on any of them.
  • Change coupling: frontend_users.py ↔ users.py backend/oasst_backend/api/v1/frontend_users.py:1 β€” `backend/oasst_backend/api/v1/frontend_users.py` and `backend/oasst_backend/api/v1/users.py` change together 60% of the time (9 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module β€” a sibling reference still needs an import β€” so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `bbf03867` Add terms of service acceptance date to user table (#1046); `4b3ce24c` add parsing of additional x-oasst-user header field (#957); `c2fa4769` Add user emoji augmentation for message queries (#937) β€” run `git show` on any of them.
  • Change coupling: chat_repository.py ↔ chats.py inference/server/oasst_inference_server/chat_repository.py:1 β€” `inference/server/oasst_inference_server/chat_repository.py` and `inference/server/oasst_inference_server/routes/chats.py` 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 `f7628a94` Inference worker inform backend on safety intervention (#2505); `cad3056f` Computing message queue positions (#2235); `791cdd41` Sending MessageRead along with error to client (#2230) β€” run `git show` on any of them.
  • Change coupling: oasst_inference_client.ts ↔ routes.ts website/src/lib/oasst_inference_client.ts:1 β€” `website/src/lib/oasst_inference_client.ts` and `website/src/lib/routes.ts` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 10 shared commits counted here, the most recent 3 are `70f30a6d` Message drafts (#3044); `9ad4062f` Add delete function (#3019); `a640bedb` Update website for new routes (#2704) β€” run `git show` on any of them.
  • Change coupling: [task_type].ts ↔ update_task.ts website/src/pages/api/new_task/[task_type].ts:1 β€” `website/src/pages/api/new_task/[task_type].ts` and `website/src/pages/api/update_task.ts` change together 50% of the time (11 of the 22 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 11 shared commits counted here, the most recent 3 are `7eaebbab` handle error when submitting task (#1802); `bc973baa` implement language as state instead of cookie (#1785); `7274512c` Implementing core of setting user languages and fetching language spe… β€” run `git show` on any of them.
  • Change coupling: index.ts ↔ index.tsx website/src/pages/api/chat/index.ts:1 β€” `website/src/pages/api/chat/index.ts` and `website/src/pages/chat/index.tsx` change together 50% of the time (5 of the 10 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 5 shared commits counted here, the most recent 3 are `ff3b3d88` Show hidden chats in chat list (#3075); `f8d1d8c5` feat(website): support pagination for chat list (#2860); `3911ea13` Add delete chat button (#2345) β€” run `git show` on any of them.
DM4 Β· Rich vs anemic model Β· Anemic entity Β· Γ—7
  • Anemic entity: Message backend/oasst_backend/models/message.py:18 β€” `Message` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: TrollStats backend/oasst_backend/models/troll_stats.py:10 β€” `TrollStats` is an aggregate/entity with 22 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: User backend/oasst_backend/models/user.py:11 β€” `User` is an aggregate/entity with 14 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: UserStats backend/oasst_backend/models/user_stats.py:18 β€” `UserStats` is an aggregate/entity with 19 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: DbMessage inference/server/oasst_inference_server/models/chat.py:11 β€” `DbMessage` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: DbChat inference/server/oasst_inference_server/models/chat.py:77 β€” `DbChat` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
  • Anemic entity: DbReport inference/server/oasst_inference_server/models/chat.py:120 β€” `DbReport` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) β€” the business logic lives in a service.
DM5 Β· Encapsulated state Β· Mutable entity Β· Γ—7
  • Mutable entity: Message backend/oasst_backend/models/message.py:18 β€” `Message` exposes publicly writable state (id, parent_id, message_tree_id, task_id, user_id, role, and 18 more).
  • Mutable entity: TrollStats backend/oasst_backend/models/troll_stats.py:10 β€” `TrollStats` exposes publicly writable state (time_frame, user_id, base_date, troll_score, modified_date, rank, and 16 more).
  • Mutable entity: User backend/oasst_backend/models/user.py:11 β€” `User` exposes publicly writable state (id, username, auth_method, display_name, created_date, api_client_id, and 8 more).
  • Mutable entity: UserStats backend/oasst_backend/models/user_stats.py:18 β€” `UserStats` exposes publicly writable state (time_frame, user_id, base_date, leader_score, modified_date, rank, and 13 more).
  • Mutable entity: DbMessage inference/server/oasst_inference_server/models/chat.py:11 β€” `DbMessage` exposes publicly writable state (role, id, created_at, chat_id, chat, reports, and 16 more).
  • Mutable entity: DbChat inference/server/oasst_inference_server/models/chat.py:77 β€” `DbChat` exposes publicly writable state (id, user_id, created_at, modified_at, title, messages, and 3 more).
  • Mutable entity: DbReport inference/server/oasst_inference_server/models/chat.py:120 β€” `DbReport` exposes publicly writable state (id, message_id, message, report_type, reason).
D4 Β· Code Duplication Β· Duplicated block (13 lines × 2) Β· Γ—6
  • Duplicated block (13 lines × 2) backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:41 β€” backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:41-53 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:91-103 β€” before extracting anything, compare `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py` and `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:41` 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) backend/oasst_backend/api/v1/users.py:133 β€” backend/oasst_backend/api/v1/users.py:133-145 | backend/oasst_backend/api/v1/users.py:152-164 β€” 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 `backend/oasst_backend/api/v1/users.py:133` 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) backend/oasst_backend/user_stats_repository.py:109 β€” backend/oasst_backend/user_stats_repository.py:109-121 | backend/oasst_backend/user_stats_repository.py:151-163 β€” 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 `backend/oasst_backend/user_stats_repository.py:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) model/model_eval/manual/sampling_report.py:63 β€” model/model_eval/manual/sampling_report.py:63-75 | model/model_eval/manual/subsample_dataset.py:18-30 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) model/model_training/custom_datasets/prompt_dialogue.py:183 β€” model/model_training/custom_datasets/prompt_dialogue.py:183-195 | model/model_training/custom_datasets/prompt_dialogue.py:242-254 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) model/model_training/trainer_rm.py:138 β€” model/model_training/trainer_rm.py:138-150 | model/model_training/trainer_sft.py:189-201 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `model/model_training/trainer_sft.py:202` calls `update` and `model/model_training/trainer_rm.py:151` 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.
X3 Β· Exception handling Β· Swallowed exception (empty catch) Β· Γ—6
  • Swallowed exception (empty catch) oasst-shared/oasst_shared/schemas/inference.py:64 β€” 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) oasst-shared/oasst_shared/schemas/inference.py:113 β€” 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) inference/worker/work.py:301 β€” 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) inference/server/oasst_inference_server/routes/workers.py:108 β€” 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) discord-bots/oa-bot-js/src/events/messages.ts:9 β€” 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) discord-bots/oa-bot-js/src/events/messages.ts:74 β€” 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.
AC2 Β· Forms & labels Β· <Textarea> field component without a label Β· Γ—5
  • <Textarea> field component without a label website/src/components/Chat/ChatForm.tsx:49 β€” This UI-library field component is named only by a placeholder β€” a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Textarea> field component without a label website/src/components/Chat/ChatMessageEntry.tsx:152 β€” This UI-library field component has no label / aria-label / aria-labelledby / id β€” and neither does anything it renders (a name prop is the form-submission key, not a label) β€” so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Textarea> field component without a label website/src/components/Chat/CustomInstructions.tsx:68 β€” This UI-library field component is named only by a placeholder β€” a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Textarea> field component without a label website/src/components/Chat/CustomInstructions.tsx:80 β€” This UI-library field component is named only by a placeholder β€” a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Textarea> field component without a label website/src/components/Messages/ReportPopup.tsx:45 β€” This UI-library field component is named only by a placeholder β€” a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Duplicated block (14 lines × 2) Β· Γ—5
  • Duplicated block (14 lines × 2) backend/export.py:75 β€” backend/export.py:75-88 | backend/export.py:146-159 β€” 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, `backend/export.py:161` calls `group_by` and `backend/export.py:89` 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 (14 lines × 2) backend/oasst_backend/utils/database_utils.py:109 β€” backend/oasst_backend/utils/database_utils.py:109-122 | backend/oasst_backend/utils/database_utils.py:163-176 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) backend/oasst_backend/utils/database_utils.py:228 β€” backend/oasst_backend/utils/database_utils.py:228-241 | backend/oasst_backend/utils/database_utils.py:289-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) model/model_training/trainer_rl.py:32 β€” model/model_training/trainer_rl.py:32-45 | model/model_training/trainer_rm.py:143-156 β€” 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 (14 lines × 2) model/model_training/trainer_rl.py:89 β€” model/model_training/trainer_rl.py:89-102 | model/model_training/utils/ppo_utils.py:551-565 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 2) Β· Γ—5
  • Duplicated block (9 lines × 2) backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:207 β€” backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:207-215 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:280-288 β€” 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) backend/alembic/versions/2023_01_05_1144-d4161e384f83_added_messagetreestate_table.py:29 β€” backend/alembic/versions/2023_01_05_1144-d4161e384f83_added_messagetreestate_table.py:29-37 | backend/alembic/versions/2023_01_08_2208-92a367bb9f40_restructure_message_tree_state_table.py:54-62 β€” 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 `backend/alembic/versions/2023_01_05_1144-d4161e384f83_added_messagetreestate_table.py:29` 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) backend/update_message_attributes.py:47 β€” backend/update_message_attributes.py:47-55 | backend/update_message_attributes.py:65-73 β€” 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) REDACTED:32 β€” REDACTED:32-40 | REDACTED:230-238 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) model/model_training/models/patching_llama.py:96 β€” model/model_training/models/patching_llama.py:96-104 | model/model_training/models/prefix_llama.py:240-248 β€” 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 `model/model_training/models/patching_llama.py:96` 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, `model/model_training/models/prefix_llama.py:249` calls `max`, `tensor`, `finfo` and `model/model_training/models/patching_llama.py:107` 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.
D17 Β· Explicit Debt Β· HackComment Β· Γ—4
  • HackComment website/src/components/MarkdownEditor.tsx:84 β€” // hack to support cypress testing β€” a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment model/pretokenizer/indexed_dataset.py:251 β€” # Hack just to make this work, can optimizer later if necessary β€” a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment model/model_training/trainer_rl.py:82 β€” # hack to allo for different tokenizers with different eos tokens ... rest of the β€” a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment REDACTED:111 β€” # hack because the "normal" inference server does this at once β€” a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 Β· God Classes Β· FileTooLong Β· Γ—4
  • FileTooLong: oasst_backend/prompt_repository.py backend/oasst_backend/prompt_repository.py β€” FileTooLong β€” 822 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 322 over it, 1.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: oasst_backend/tree_manager.py backend/oasst_backend/tree_manager.py β€” FileTooLong β€” 551 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 51 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: oasst_backend/user_stats_repository.py backend/oasst_backend/user_stats_repository.py β€” FileTooLong β€” 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED β€” FileTooLong β€” 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D36 Β· Supply-chain Provenance & Signing REDACTED Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Duplicated block (12 lines × 2) Β· Γ—4
  • Duplicated block (12 lines × 2) data/datasets/mt_note_generation/prepare.py:68 β€” data/datasets/mt_note_generation/prepare.py:68-79 | REDACTED:106-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 (12 lines × 2) inference/server/oasst_inference_server/user_chat_repository.py:245 β€” inference/server/oasst_inference_server/user_chat_repository.py:245-256 | inference/server/oasst_inference_server/user_chat_repository.py:281-292 β€” 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) model/model_training/custom_datasets/translation.py:117 β€” model/model_training/custom_datasets/translation.py:117-128 | model/model_training/custom_datasets/translation.py:160-171 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) backend/oasst_backend/utils/ranking.py:68 β€” backend/oasst_backend/utils/ranking.py:68-79 | scripts/postprocessing/rankings.py:68-79 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 2) Β· Γ—4
  • Duplicated block (10 lines × 2) backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:28 β€” backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:28-37 | backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:35-44 β€” 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) backend/oasst_backend/user_repository.py:242 β€” backend/oasst_backend/user_repository.py:242-251 | backend/oasst_backend/user_repository.py:310-319 β€” 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 `backend/oasst_backend/user_repository.py:242` 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) backend/oasst_backend/utils/ranking.py:55 β€” backend/oasst_backend/utils/ranking.py:55-64 | scripts/postprocessing/rankings.py:55-64 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) backend/oasst_backend/utils/tree_export.py:118 β€” backend/oasst_backend/utils/tree_export.py:118-127 | inference/server/export.py:33-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.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 2) Β· Γ—4
  • Duplicated block (8 lines × 2) backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:28 β€” backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:28-35 | backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:150-157 β€” before extracting anything, compare `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py` and `backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:28` 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) backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:282 β€” backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:282-289 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:306-313 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:91 β€” inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:91-98 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:134-141 β€” 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 `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py: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 before the matched lines, `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:90` calls `Column`, `DateTime` and `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:133` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) REDACTED:585 β€” REDACTED:585-592 | REDACTED:621-628 β€” 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 `REDACTED:585` 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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 2) Β· Γ—4
  • Duplicated block (6 lines × 2) backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:37 β€” backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:37-42 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:126-131 β€” 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) backend/oasst_backend/tree_manager.py:588 β€” backend/oasst_backend/tree_manager.py:588-593 | backend/oasst_backend/tree_manager.py:613-618 β€” 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) model/model_training/utils/losses.py:65 β€” model/model_training/utils/losses.py:65-70 | model/model_training/utils/losses.py:93-99 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) text-frontend/__main__.py:41 β€” text-frontend/__main__.py:41-46 | text-frontend/auto_main.py:32-37 β€” before extracting anything, compare `text-frontend/__main__.py` and `text-frontend/auto_main.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 2) Β· Γ—4
  • Duplicated block (5 lines × 2) backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:328 β€” backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:328-332 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:152-156 β€” 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) backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:30 β€” backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:30-34 | backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:41-45 β€” 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 `backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:30` 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) backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:265 β€” backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:265-269 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:294-298 β€” 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 `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:265` 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, `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:299` calls `create_index` and `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:270` 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 × 2) scripts/xor-codec/xor_codec.py:12 β€” scripts/xor-codec/xor_codec.py:12-16 | scripts/xor-codec/xor_codec.py:52-56 β€” 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.
AC2 Β· Forms & labels Β· <Select> field component without a label Β· Γ—3
  • <Select> field component without a label website/src/components/Chat/ChatConfigForm.tsx:190 β€” This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content β€” so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Select> field component without a label website/src/components/LanguageSelector/LanguageSelector.tsx:45 β€” This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content β€” so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <Select> field component without a label website/src/components/Stats/Stats.components.tsx:172 β€” This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content β€” so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
D10 Β· Test Quality Β· No assertions Β· Γ—3
  • No assertions: completes the current task on submit and on request shows a new task website/cypress/e2e/tasks/label_assistant_reply.cy.ts:2 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: completes the current task on submit and on request shows a new task website/cypress/e2e/tasks/label_initial_prompt.cy.ts:2 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: completes the current task on submit and on request shows a new task website/cypress/e2e/tasks/label_prompter_reply.cy.ts:2 β€” 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* β€” so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D3 Β· God Classes Β· TooManyMethods Β· Γ—3
  • TooManyMethods: TreeManager backend/oasst_backend/tree_manager.py:152 β€” TooManyMethods β€” 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: OasstApiClient website/src/lib/oasst_api_client.ts:40 β€” TooManyMethods β€” 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: PromptRepository backend/oasst_backend/prompt_repository.py:59 β€” TooManyMethods β€” 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 Β· Supply-chain Provenance & Signing REDACTED Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 Β· Forms & labels Β· <RadioGroup> field component without a label Β· Γ—2
  • <RadioGroup> field component without a label website/src/components/Buttons/LikertButtons.tsx:18 β€” This UI-library field component has no label / aria-label / aria-labelledby / id β€” and neither does anything it renders (a name prop is the form-submission key, not a label) β€” so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
  • <RadioGroup> field component without a label website/src/pages/admin/trollboard.tsx:42 β€” This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content β€” so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ—2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) model/model_training/check_dataset_counts.py:44 β€” model/model_training/check_dataset_counts.py:44-113 | model/model_training/trainer_rm.py:132-180 | model/model_training/trainer_sft.py:170-238 | REDACTED:294-365 β€” 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) model/model_training/trainer_rl.py:26 β€” model/model_training/trainer_rl.py:26-64 | model/model_training/trainer_rm.py:132-180 | model/model_training/trainer_sft.py:170-238 | REDACTED:294-365 β€” 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 Β· Duplicated block (34 lines × 2) Β· Γ—2
  • Duplicated block (34 lines × 2) backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:36 β€” backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:36-69 | backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:158-191 β€” before extracting anything, compare `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py` and `backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:36` 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) backend/export.py:346 β€” backend/export.py:346-379 | oasst-data/examples/filter_messages.py:46-79 β€” before extracting anything, compare `backend/export.py` and `oasst-data/examples/filter_messages.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/export.py:346` 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.
D4 Β· Code Duplication Β· Duplicated block (29 lines × 2) Β· Γ—2
  • Duplicated block (29 lines × 2) model/model_training/tools/augment_oasst.py:85 β€” model/model_training/tools/augment_oasst.py:85-113 | model/model_training/tools/augment_oasst.py:121-149 β€” 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 `model/model_training/tools/augment_oasst.py:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (29 lines × 2) model/model_training/trainer_rm.py:271 β€” model/model_training/trainer_rm.py:271-299 | model/model_training/trainer_sft.py:298-326 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 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.
D4 Β· Code Duplication Β· Duplicated block (24 lines × 2) Β· Γ—2
  • Duplicated block (24 lines × 2) backend/export.py:325 β€” backend/export.py:325-348 | oasst-data/examples/filter_messages.py:19-42 β€” before extracting anything, compare `backend/export.py` and `oasst-data/examples/filter_messages.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/export.py:325` 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 lines × 2) backend/oasst_backend/utils/database_utils.py:84 β€” backend/oasst_backend/utils/database_utils.py:84-107 | backend/oasst_backend/utils/database_utils.py:138-161 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 2) Β· Γ—2
  • Duplicated block (21 lines × 2) model/model_training/trainer_rm.py:158 β€” model/model_training/trainer_rm.py:158-178 | model/model_training/trainer_sft.py:214-234 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `model/model_training/trainer_sft.py:212` calls `exit` and `model/model_training/trainer_rm.py:156` 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 (21 lines × 2) backend/alembic/env.py:30 β€” backend/alembic/env.py:30-50 | inference/server/alembic/env.py:33-53 β€” before extracting anything, compare `backend/alembic/env.py` and `inference/server/alembic/env.py` as WHOLE FILES: 87% 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.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 3) Β· Γ—2
  • Duplicated block (11 lines × 3) inference/server/oasst_inference_server/user_chat_repository.py:196 β€” inference/server/oasst_inference_server/user_chat_repository.py:196-206 | inference/server/oasst_inference_server/user_chat_repository.py:246-256 | inference/server/oasst_inference_server/user_chat_repository.py:282-292 β€” 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 (11 lines × 3) scripts/xor-codec/xor_codec.py:17 β€” scripts/xor-codec/xor_codec.py:17-27 | scripts/xor-codec/xor_codec.py:37-47 | scripts/xor-codec/xor_codec.py:57-67 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—2
  • Duplicated block (11 lines × 2) backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:29 β€” backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:29-39 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:61-71 β€” 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 `backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:29` 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) model/model_training/trainer_rm.py:253 β€” model/model_training/trainer_rm.py:253-263 | model/model_training/trainer_sft.py:432-442 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 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.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 3) Β· Γ—2
  • Duplicated block (9 lines × 3) backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:29 β€” backend/alembic/versions/2022_12_25_1705-067c4002f2d9_add_text_labels.py:29-37 | backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:36-44 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:61-69 β€” before extracting anything, compare `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py` and `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 lines × 3) model/model_training/tools/augment_oasst.py:101 β€” model/model_training/tools/augment_oasst.py:101-109 | model/model_training/tools/augment_oasst.py:137-145 | model/model_training/tools/augment_oasst.py:185-193 β€” 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 `model/model_training/tools/augment_oasst.py:101` 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.
R10 Β· Code Duplication Β· Duplicated block (12 lines × 2 locations) Β· Γ—2
  • Duplicated block (12 lines × 2 locations) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/info.ts:52 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/info.ts:52 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/init.ts:28 β€” 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 (12 lines × 2 locations) discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:2 β€” discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:2 · discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:14 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
R10 Β· Code Duplication Β· Duplicated block (11 lines × 2 locations) Β· Γ—2
  • Duplicated block (11 lines × 2 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:118 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:118 · discord-bots/oa-bot-js/src/interactions/tasks.ts:130 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (11 lines × 2 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:197 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:197 · discord-bots/oa-bot-js/src/interactions/tasks.ts:241 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 Β· Code Duplication Β· Duplicated block (8 lines × 2 locations) Β· Γ—2
  • Duplicated block (8 lines × 2 locations) discord-bots/oa-bot-js/src/handlers/commands.ts:13 β€” discord-bots/oa-bot-js/src/handlers/commands.ts:13 · discord-bots/oa-bot-js/src/handlers/events.ts:9 β€” 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 (8 lines × 2 locations) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:60 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:60 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:90 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X2 Β· Cancellation propagation Β· Async function without AbortSignal Β· Γ—2
  • Async function without AbortSignal: checkCaptcha website/src/lib/captcha.ts:20 β€” `checkCaptcha` 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: getTranlation discord-bots/oa-bot-js/src/modules/open-assistant/langs.ts:1 β€” `getTranlation` 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 })`.
AC2 Β· Forms & labels Β· <NumberInput> field component without a label Β· Γ—1
  • <NumberInput> field component without a label website/src/components/Chat/ChatConfigForm.tsx:440 β€” This UI-library field component has no label / aria-label / aria-labelledby / id β€” and neither does anything it renders (a name prop is the form-submission key, not a label) β€” so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) β€” labelling each item leaves the set unnamed.
AC3 Β· Page structure Β· Heading level jumps from h2 to h4 Β· Γ—1
  • Heading level jumps from h2 to h4 website/src/components/Roadmap.tsx:13 β€” Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels β€” increase by at most one.
AC7 Β· A11y enforcement Β· Accessibility enforcement below the top rung Β· Γ—1
  • Accessibility enforcement below the top rung β€” No accessibility enforcement found β€” no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 165 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files β€” matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 Β· Cyclomatic Complexity Β· TreeManager.next_task (cyclomatic 47) Β· Γ—1
  • TreeManager.next_task (cyclomatic 47) backend/oasst_backend/tree_manager.py:408 β€” TreeManager.next_task 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.
D1 Β· Cyclomatic Complexity Β· ChatConversation.ChatConversation (cyclomatic 47) Β· Γ—1
  • ChatConversation.ChatConversation (cyclomatic 47) website/src/components/Chat/ChatConversation.tsx:35 β€” ChatConversation.ChatConversation has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 14 of the 47 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 234, 77, 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.
D1 Β· Cyclomatic Complexity Β· custom_datasets.get_one_dataset (cyclomatic 44) Β· Γ—1
  • custom_datasets.get_one_dataset (cyclomatic 44) model/model_training/custom_datasets/__init__.py:91 β€” custom_datasets.get_one_dataset has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· label.labelInteraction (cyclomatic 41) Β· Γ—1
  • label.labelInteraction (cyclomatic 41) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18 β€” label.labelInteraction has cyclomatic complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 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.
D1 Β· Cyclomatic Complexity Β· ChatMessageEntry.ChatMessageEntry (cyclomatic 37) Β· Γ—1
  • ChatMessageEntry.ChatMessageEntry (cyclomatic 37) website/src/components/Chat/ChatMessageEntry.tsx:46 β€” ChatMessageEntry.ChatMessageEntry has cyclomatic complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 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.
D1 Β· Cyclomatic Complexity Β· __main__.main (cyclomatic 34) Β· Γ—1
  • __main__.main (cyclomatic 34) text-frontend/__main__.py:28 β€” __main__.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.
D1 Β· Cyclomatic Complexity Β· patching.patch_model (cyclomatic 33) Β· Γ—1
  • patching.patch_model (cyclomatic 33) model/model_training/models/patching.py:89 β€” patching.patch_model has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· trainer_sft.main (cyclomatic 32) Β· Γ—1
  • trainer_sft.main (cyclomatic 32) model/model_training/trainer_sft.py:284 β€” trainer_sft.main 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.
D1 Β· Cyclomatic Complexity Β· LlamaModel.forward (cyclomatic 30) Β· Γ—1
  • LlamaModel.forward (cyclomatic 30) model/model_training/models/prefix_llama.py:498 β€” LlamaModel.forward has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· main.get_url_content (cyclomatic 30) Β· Γ—1
  • main.get_url_content (cyclomatic 30) REDACTED:110 β€” main.get_url_content has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· workers.handle_worker (cyclomatic 30) Β· Γ—1
  • workers.handle_worker (cyclomatic 30) inference/server/oasst_inference_server/routes/workers.py:89 β€” workers.handle_worker 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.
D1 Β· Cyclomatic Complexity Β· random_stuff.qna_random_magic (cyclomatic 27) Β· Γ—1
  • random_stuff.qna_random_magic (cyclomatic 27) data/datasets/semantics_ws_qna_oa/random_stuff.py:411 β€” random_stuff.qna_random_magic has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· Task.Task (cyclomatic 27) Β· Γ—1
  • Task.Task (cyclomatic 27) website/src/components/Tasks/Task/Task.tsx:67 β€” Task.Task has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 73, 135, 170, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 Β· Cyclomatic Complexity Β· PromptRepository.store_text_labels (cyclomatic 26) Β· Γ—1
  • PromptRepository.store_text_labels (cyclomatic 26) backend/oasst_backend/prompt_repository.py:524 β€” PromptRepository.store_text_labels 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.
D1 Β· Cyclomatic Complexity Β· PromptRepository.query_messages_ordered_by_created_date (cyclomatic 26) Β· Γ—1
  • PromptRepository.query_messages_ordered_by_created_date (cyclomatic 26) backend/oasst_backend/prompt_repository.py:1010 β€” PromptRepository.query_messages_ordered_by_created_date 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.
D1 Β· Cyclomatic Complexity Β· auto_main.main (cyclomatic 26) Β· Γ—1
  • auto_main.main (cyclomatic 26) text-frontend/auto_main.py:27 β€” auto_main.main 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.
D1 Β· Cyclomatic Complexity Β· trainer_rm.main (cyclomatic 25) Β· Γ—1
  • trainer_rm.main (cyclomatic 25) model/model_training/trainer_rm.py:183 β€” trainer_rm.main 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.
D1 Β· Cyclomatic Complexity Β· pretokenize.tokenize_dataset (cyclomatic 25) Β· Γ—1
  • pretokenize.tokenize_dataset (cyclomatic 25) REDACTED:142 β€” pretokenize.tokenize_dataset 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.
D1 Β· Cyclomatic Complexity Β· PromptRepository.handle_message_emoji (cyclomatic 24) Β· Γ—1
  • PromptRepository.handle_message_emoji (cyclomatic 24) backend/oasst_backend/prompt_repository.py:1244 β€” PromptRepository.handle_message_emoji has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· UserStatsRepository._update_stats_internal (cyclomatic 23) Β· Γ—1
  • UserStatsRepository._update_stats_internal (cyclomatic 23) backend/oasst_backend/user_stats_repository.py:300 β€” UserStatsRepository._update_stats_internal 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 Β· prepare.main (cyclomatic 23) Β· Γ—1
  • prepare.main (cyclomatic 23) data/datasets/soda_synthetic_dialogue/prepare.py:77 β€” prepare.main 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 Β· AdminMessageTable.AdminMessageTable (cyclomatic 23) Β· Γ—1
  • AdminMessageTable.AdminMessageTable (cyclomatic 23) website/src/components/Messages/AdminMessageTable.tsx:54 β€” AdminMessageTable.AdminMessageTable has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 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 129, a function literal at line 215, onClose, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 Β· Cyclomatic Complexity Β· messages.get_messages_cursor (cyclomatic 22) Β· Γ—1
  • messages.get_messages_cursor (cyclomatic 22) backend/oasst_backend/api/v1/messages.py:60 β€” messages.get_messages_cursor 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.
D1 Β· Cyclomatic Complexity Β· DialogueDataCollator.process_one (cyclomatic 21) Β· Γ—1
  • DialogueDataCollator.process_one (cyclomatic 21) model/model_training/custom_datasets/dialogue_collator.py:51 β€” DialogueDataCollator.process_one has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· admin.get_flagged_messages_cursor (cyclomatic 21) Β· Γ—1
  • admin.get_flagged_messages_cursor (cyclomatic 21) backend/oasst_backend/api/v1/admin.py:182 β€” admin.get_flagged_messages_cursor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· TreeManager.handle_interaction (cyclomatic 21) Β· Γ—1
  • TreeManager.handle_interaction (cyclomatic 21) backend/oasst_backend/tree_manager.py:724 β€” TreeManager.handle_interaction has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· __main__.main (cyclomatic 20) Β· Γ—1
  • __main__.main (cyclomatic 20) inference/worker/__main__.py:23 β€” __main__.main has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· work.handle_work_request (cyclomatic 20) Β· Γ—1
  • work.handle_work_request (cyclomatic 20) inference/worker/work.py:98 β€” work.handle_work_request has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· oasst_dataset.load_oasst_export (cyclomatic 19) Β· Γ—1
  • oasst_dataset.load_oasst_export (cyclomatic 19) model/model_training/custom_datasets/oasst_dataset.py:23 β€” oasst_dataset.load_oasst_export has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· LlamaForSequenceClassification.forward (cyclomatic 19) Β· Γ—1
  • LlamaForSequenceClassification.forward (cyclomatic 19) model/model_training/models/prefix_llama.py:876 β€” LlamaForSequenceClassification.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· export.export_trees (cyclomatic 19) Β· Γ—1
  • export.export_trees (cyclomatic 19) backend/export.py:169 β€” export.export_trees has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· PromptRepository.store_text_reply (cyclomatic 19) Β· Γ—1
  • PromptRepository.store_text_reply (cyclomatic 19) backend/oasst_backend/prompt_repository.py:215 β€” PromptRepository.store_text_reply has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· work.work2 (cyclomatic 19) Β· Γ—1
  • work.work2 (cyclomatic 19) discord-bots/oa-bot-py/bot/extensions/work.py:364 β€” work.work2 has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· MessageTableEntry.MessageTableEntry (cyclomatic 19) Β· Γ—1
  • MessageTableEntry.MessageTableEntry (cyclomatic 19) website/src/components/Messages/MessageTableEntry.tsx:65 β€” MessageTableEntry.MessageTableEntry has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 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.
D1 Β· Cyclomatic Complexity Β· prompt_dialogue.load_oig_file (cyclomatic 18) Β· Γ—1
  • prompt_dialogue.load_oig_file (cyclomatic 18) model/model_training/custom_datasets/prompt_dialogue.py:16 β€” prompt_dialogue.load_oig_file has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· chat_chain.handle_plugin_usage (cyclomatic 18) Β· Γ—1
  • chat_chain.handle_plugin_usage (cyclomatic 18) inference/worker/chat_chain.py:104 β€” chat_chain.handle_plugin_usage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· tree_export.prepare_export_message_node (cyclomatic 17) Β· Γ—1
  • tree_export.prepare_export_message_node (cyclomatic 17) backend/oasst_backend/utils/tree_export.py:26 β€” tree_export.prepare_export_message_node has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ChatListItem.ChatListItem (cyclomatic 17) Β· Γ—1
  • ChatListItem.ChatListItem (cyclomatic 17) website/src/components/Chat/ChatListItem.tsx:35 β€” ChatListItem.ChatListItem 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.
D1 Β· Cyclomatic Complexity Β· Vicuna.process_vicuna_conversations (cyclomatic 16) Β· Γ—1
  • Vicuna.process_vicuna_conversations (cyclomatic 16) REDACTED:470 β€” Vicuna.process_vicuna_conversations has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· CustomPPOTrainer.make_experience (cyclomatic 16) Β· Γ—1
  • CustomPPOTrainer.make_experience (cyclomatic 16) model/model_training/utils/ppo_utils.py:303 β€” CustomPPOTrainer.make_experience has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· UserRepository.query_users_ordered_by_display_name (cyclomatic 16) Β· Γ—1
  • UserRepository.query_users_ordered_by_display_name (cyclomatic 16) backend/oasst_backend/user_repository.py:264 β€” UserRepository.query_users_ordered_by_display_name has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· chat_chain_utils.compose_tools_from_plugin (cyclomatic 16) Β· Γ—1
  • chat_chain_utils.compose_tools_from_plugin (cyclomatic 16) inference/worker/chat_chain_utils.py:237 β€” chat_chain_utils.compose_tools_from_plugin has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ChatConfigForm.useHydrateChatConfig (cyclomatic 16) Β· Γ—1
  • ChatConfigForm.useHydrateChatConfig (cyclomatic 16) website/src/components/Chat/ChatConfigForm.tsx:238 β€” ChatConfigForm.useHydrateChatConfig has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 252). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 Β· Cyclomatic Complexity Β· ChatConversationTree.TreeChildren (cyclomatic 16) Β· Γ—1
  • ChatConversationTree.TreeChildren (cyclomatic 16) website/src/components/Chat/ChatConversationTree.tsx:47 β€” ChatConversationTree.TreeChildren has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
D2 Β· Cognitive Complexity Β· TreeManager.next_task (cognitive 97) Β· Γ—1
  • TreeManager.next_task (cognitive 97) backend/oasst_backend/tree_manager.py:408 β€” TreeManager.next_task has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (85 pts), boolean chains 7, loops 1 (4 pts), match/switch 1 (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· __main__.main (cognitive 89) Β· Γ—1
  • __main__.main (cognitive 89) text-frontend/__main__.py:28 β€” __main__.main has cognitive complexity 89 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 9 (27 pts), ternaries 4 (20 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent 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 Β· label.labelInteraction (cognitive 83) Β· Γ—1
  • label.labelInteraction (cognitive 83) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18 β€” label.labelInteraction has cognitive complexity 83 (threshold 15). Drivers by points: if/else 31 (66 pts), ternaries 4 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 42). Of this number, 48 points are the body's own statements and 35 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· auto_main.main (cognitive 70) Β· Γ—1
  • auto_main.main (cognitive 70) text-frontend/auto_main.py:27 β€” auto_main.main has cognitive complexity 70 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 5 (17 pts), ternaries 2 (10 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 50). To reduce it, split the body into named stages: move each independent 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 Β· export.export_trees (cognitive 58) Β· Γ—1
  • export.export_trees (cognitive 58) backend/export.py:169 β€” export.export_trees has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 4 (11 pts), error handling 1 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· PromptRepository.store_text_labels (cognitive 50) Β· Γ—1
  • PromptRepository.store_text_labels (cognitive 50) backend/oasst_backend/prompt_repository.py:524 β€” PromptRepository.store_text_labels has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 7, ternaries 2 (5 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.
D2 Β· Cognitive Complexity Β· ChatConversation.ChatConversation (cognitive 50) Β· Γ—1
  • ChatConversation.ChatConversation (cognitive 50) website/src/components/Chat/ChatConversation.tsx:35 β€” ChatConversation.ChatConversation has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 15, error handling 5, ternaries 4 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 234, 77, 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.
D2 Β· Cognitive Complexity Β· tree_export.prepare_export_message_node (cognitive 49) Β· Γ—1
  • tree_export.prepare_export_message_node (cognitive 49) backend/oasst_backend/utils/tree_export.py:26 β€” tree_export.prepare_export_message_node has cognitive complexity 49 (threshold 15). Drivers by points: if/else 7 (33 pts), loops 2 (7 pts), match/switch 1 (5 pts), ternaries 3, boolean chains 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.
D2 Β· Cognitive Complexity Β· workers.handle_worker (cognitive 48) Β· Γ—1
  • workers.handle_worker (cognitive 48) inference/server/oasst_inference_server/routes/workers.py:89 β€” workers.handle_worker has cognitive complexity 48 (threshold 15). Drivers by points: error handling 10 (20 pts), if/else 8 (18 pts), loops 4 (6 pts), 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.
D2 Β· Cognitive Complexity Β· trainer_sft.main (cognitive 47) Β· Γ—1
  • trainer_sft.main (cognitive 47) model/model_training/trainer_sft.py:284 β€” trainer_sft.main has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 7, loops 3 (6 pts), ternaries 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· pretokenize.tokenize_dataset (cognitive 43) Β· Γ—1
  • pretokenize.tokenize_dataset (cognitive 43) REDACTED:142 β€” pretokenize.tokenize_dataset has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 5 (8 pts), boolean chains 4 (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.
D2 Β· Cognitive Complexity Β· main.get_url_content (cognitive 43) Β· Γ—1
  • main.get_url_content (cognitive 43) REDACTED:110 β€” main.get_url_content has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 7 (13 pts), ternaries 4, boolean chains 2, error handling 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· prepare.main (cognitive 42) Β· Γ—1
  • prepare.main (cognitive 42) data/datasets/soda_synthetic_dialogue/prepare.py:77 β€” prepare.main has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 2 (3 pts), boolean chains 2 (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.
D2 Β· Cognitive Complexity Β· TreeManager.handle_interaction (cognitive 41) Β· Γ—1
  • TreeManager.handle_interaction (cognitive 41) backend/oasst_backend/tree_manager.py:724 β€” TreeManager.handle_interaction has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (31 pts), error handling 2 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction β€” a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β€” so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 Β· Cognitive Complexity Β· patching.patch_model (cognitive 40) Β· Γ—1
  • patching.patch_model (cognitive 40) model/model_training/models/patching.py:89 β€” patching.patch_model has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 12, error handling 1 (2 pts), loops 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.
D2 Β· Cognitive Complexity Β· trainer_rm.main (cognitive 39) Β· Γ—1
  • trainer_rm.main (cognitive 39) model/model_training/trainer_rm.py:183 β€” trainer_rm.main has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 6, loops 2 (4 pts), ternaries 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· LlamaModel.forward (cognitive 38) Β· Γ—1
  • LlamaModel.forward (cognitive 38) model/model_training/models/prefix_llama.py:498 β€” LlamaModel.forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 10 (13 pts), boolean chains 3, 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.
D2 Β· Cognitive Complexity Β· oasst_dataset.load_oasst_export (cognitive 34) Β· Γ—1
  • oasst_dataset.load_oasst_export (cognitive 34) model/model_training/custom_datasets/oasst_dataset.py:23 β€” oasst_dataset.load_oasst_export has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 2 (4 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.
D2 Β· Cognitive Complexity Β· prompt_dialogue.load_oig_file (cognitive 34) Β· Γ—1
  • prompt_dialogue.load_oig_file (cognitive 34) model/model_training/custom_datasets/prompt_dialogue.py:16 β€” prompt_dialogue.load_oig_file has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· CustomPPOTrainer.make_experience (cognitive 34) Β· Γ—1
  • CustomPPOTrainer.make_experience (cognitive 34) model/model_training/utils/ppo_utils.py:303 β€” CustomPPOTrainer.make_experience has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (28 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.
D2 Β· Cognitive Complexity Β· PromptRepository.handle_message_emoji (cognitive 34) Β· Γ—1
  • PromptRepository.handle_message_emoji (cognitive 34) backend/oasst_backend/prompt_repository.py:1244 β€” PromptRepository.handle_message_emoji has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· work.perform_oom_test (cognitive 34) Β· Γ—1
  • work.perform_oom_test (cognitive 34) inference/worker/work.py:242 β€” work.perform_oom_test has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 4 (10 pts), error handling 4 (8 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.
D2 Β· Cognitive Complexity Β· __main__.main (cognitive 33) Β· Γ—1
  • __main__.main (cognitive 33) inference/worker/__main__.py:23 β€” __main__.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (7 pts), error handling 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· sampling_report.merge_configs (cognitive 32) Β· Γ—1
  • sampling_report.merge_configs (cognitive 32) model/model_eval/manual/sampling_report.py:147 β€” sampling_report.merge_configs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (12 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.
D2 Β· Cognitive Complexity Β· PromptRepository.query_messages_ordered_by_created_date (cognitive 32) Β· Γ—1
  • PromptRepository.query_messages_ordered_by_created_date (cognitive 32) backend/oasst_backend/prompt_repository.py:1010 β€” PromptRepository.query_messages_ordered_by_created_date has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· CustomCausalLMHydraWithValueHead.from_pretrained (cognitive 31) Β· Γ—1
  • CustomCausalLMHydraWithValueHead.from_pretrained (cognitive 31) model/model_training/utils/ppo_utils.py:40 β€” CustomCausalLMHydraWithValueHead.from_pretrained has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (7 pts), error handling 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· messages.get_messages_cursor (cognitive 31) Β· Γ—1
  • messages.get_messages_cursor (cognitive 31) backend/oasst_backend/api/v1/messages.py:60 β€” messages.get_messages_cursor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5 (9 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· work.handle_work_request (cognitive 31) Β· Γ—1
  • work.handle_work_request (cognitive 31) inference/worker/work.py:98 β€” work.handle_work_request has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 4 (5 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· admin.get_flagged_messages_cursor (cognitive 30) Β· Γ—1
  • admin.get_flagged_messages_cursor (cognitive 30) backend/oasst_backend/api/v1/admin.py:182 β€” admin.get_flagged_messages_cursor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 4 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Task.Task (cognitive 30) Β· Γ—1
  • Task.Task (cognitive 30) website/src/components/Tasks/Task/Task.tsx:67 β€” Task.Task has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (8 pts), match/switch 4 (7 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 13). None of this is in the body itself: all 30 points belong to 5 function literals inside it that branch (lines 73, 135, 162, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 Β· Cognitive Complexity Β· create_synth_import.main (cognitive 29) Β· Γ—1
  • create_synth_import.main (cognitive 29) model/model_eval/manual/create_synth_import.py:39 β€” create_synth_import.main has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 5 (13 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.
D2 Β· Cognitive Complexity Β· DialogueDataCollator.process_one (cognitive 29) Β· Γ—1
  • DialogueDataCollator.process_one (cognitive 29) model/model_training/custom_datasets/dialogue_collator.py:51 β€” DialogueDataCollator.process_one has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5, loops 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.
D2 Β· Cognitive Complexity Β· Vicuna.process_vicuna_conversations (cognitive 28) Β· Γ—1
  • Vicuna.process_vicuna_conversations (cognitive 28) REDACTED:470 β€” Vicuna.process_vicuna_conversations has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, loops 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.
D2 Β· Cognitive Complexity Β· twitter_process_json.process_single_file (cognitive 28) Β· Γ—1
  • twitter_process_json.process_single_file (cognitive 28) scripts/data-collection/twitter/twitter_process_json.py:145 β€” twitter_process_json.process_single_file has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (6 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· DialogueDataCollator.__call__ (cognitive 26) Β· Γ—1
  • DialogueDataCollator.__call__ (cognitive 26) model/model_training/custom_datasets/dialogue_collator.py:139 β€” DialogueDataCollator.__call__ has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (11 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.
D2 Β· Cognitive Complexity Β· sampling_report.sample (cognitive 25) Β· Γ—1
  • sampling_report.sample (cognitive 25) model/model_eval/manual/sampling_report.py:82 β€” sampling_report.sample has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, 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.
D2 Β· Cognitive Complexity Β· LlamaForSequenceClassification.forward (cognitive 25) Β· Γ—1
  • LlamaForSequenceClassification.forward (cognitive 25) model/model_training/models/prefix_llama.py:876 β€” LlamaForSequenceClassification.forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 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.
D2 Β· Cognitive Complexity Β· CustomPPOTrainer.decode (cognitive 25) Β· Γ—1
  • CustomPPOTrainer.decode (cognitive 25) model/model_training/utils/ppo_utils.py:151 β€” CustomPPOTrainer.decode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· chat_chain_utils.compose_tools_from_plugin (cognitive 25) Β· Γ—1
  • chat_chain_utils.compose_tools_from_plugin (cognitive 25) inference/worker/chat_chain_utils.py:237 β€” chat_chain_utils.compose_tools_from_plugin has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (6 pts), boolean chains 3, error handling 1 (3 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.
D2 Β· Cognitive Complexity Β· ChatMessageEntry.ChatMessageEntry (cognitive 25) Β· Γ—1
  • ChatMessageEntry.ChatMessageEntry (cognitive 25) website/src/components/Chat/ChatMessageEntry.tsx:46 β€” ChatMessageEntry.ChatMessageEntry has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 19, if/else 5, ternaries 1. Of this number, 17 points are the body's own statements and 8 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.
D2 Β· Cognitive Complexity Β· utils.get_model (cognitive 24) Β· Γ—1
  • utils.get_model (cognitive 24) model/model_training/utils/utils.py:301 β€” utils.get_model has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, 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.
D2 Β· Cognitive Complexity Β· PromptRepository.store_text_reply (cognitive 24) Β· Γ—1
  • PromptRepository.store_text_reply (cognitive 24) backend/oasst_backend/prompt_repository.py:215 β€” PromptRepository.store_text_reply has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· chat_chain.handle_plugin_usage (cognitive 24) Β· Γ—1
  • chat_chain.handle_plugin_usage (cognitive 24) inference/worker/chat_chain.py:104 β€” chat_chain.handle_plugin_usage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 3 (4 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.
D2 Β· Cognitive Complexity Β· AdminMessageTable.AdminMessageTable (cognitive 24) Β· Γ—1
  • AdminMessageTable.AdminMessageTable (cognitive 24) website/src/components/Messages/AdminMessageTable.tsx:54 β€” AdminMessageTable.AdminMessageTable has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, ternaries 8 (9 pts), if/else 5 (nesting depth added 1). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 129, a function literal at line 215, onClose, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 Β· Cognitive Complexity Β· patching_llama.llama_forward_with_flash_attn (cognitive 23) Β· Γ—1
  • patching_llama.llama_forward_with_flash_attn (cognitive 23) model/model_training/models/patching_llama.py:14 β€” patching_llama.llama_forward_with_flash_attn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· UserStatsRepository._update_stats_internal (cognitive 23) Β· Γ—1
  • UserStatsRepository._update_stats_internal (cognitive 23) backend/oasst_backend/user_stats_repository.py:300 β€” UserStatsRepository._update_stats_internal has cognitive complexity 23 (threshold 15). Drivers by points: loops 11 (12 pts), if/else 6 (11 pts) (nesting depth added 6). 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.
D2 Β· Cognitive Complexity Β· ChatConfigForm.useHydrateChatConfig (cognitive 23) Β· Γ—1
  • ChatConfigForm.useHydrateChatConfig (cognitive 23) website/src/components/Chat/ChatConfigForm.tsx:238 β€” ChatConfigForm.useHydrateChatConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3 (nesting depth added 6). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 252). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 Β· Cognitive Complexity Β· task.taskInteraction (cognitive 22) Β· Γ—1
  • task.taskInteraction (cognitive 22) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:14 β€” task.taskInteraction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 69, 98). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 Β· Cognitive Complexity Β· check_dataset_counts.argument_parsing (cognitive 21) Β· Γ—1
  • check_dataset_counts.argument_parsing (cognitive 21) model/model_training/check_dataset_counts.py:43 β€” check_dataset_counts.argument_parsing has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· RankingDataCollator.process_one (cognitive 20) Β· Γ—1
  • RankingDataCollator.process_one (cognitive 20) model/model_training/custom_datasets/ranking_collator.py:26 β€” RankingDataCollator.process_one has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· UserRepository.query_users_ordered_by_display_name (cognitive 20) Β· Γ—1
  • UserRepository.query_users_ordered_by_display_name (cognitive 20) backend/oasst_backend/user_repository.py:264 β€” UserRepository.query_users_ordered_by_display_name has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (20 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· ChatListItem.ChatListItem (cognitive 20) Β· Γ—1
  • ChatListItem.ChatListItem (cognitive 20) website/src/components/Chat/ChatListItem.tsx:35 β€” ChatListItem.ChatListItem has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 3, boolean chains 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· utils.get_dataset_fractions (cognitive 19) Β· Γ—1
  • utils.get_dataset_fractions (cognitive 19) model/model_training/utils/utils.py:138 β€” utils.get_dataset_fractions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 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.
D2 Β· Cognitive Complexity Β· UserRepository.query_users_ordered_by_username (cognitive 19) Β· Γ—1
  • UserRepository.query_users_ordered_by_username (cognitive 19) backend/oasst_backend/user_repository.py:204 β€” UserRepository.query_users_ordered_by_username has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (19 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· openapi_parser.parse_plugin_endpoint (cognitive 19) Β· Γ—1
  • openapi_parser.parse_plugin_endpoint (cognitive 19) inference/worker/openapi_parser.py:57 β€” openapi_parser.parse_plugin_endpoint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· index.StatusIndex (cognitive 19) Β· Γ—1
  • index.StatusIndex (cognitive 19) website/src/pages/admin/status/index.tsx:29 β€” index.StatusIndex has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HFSummary.__init__ (cognitive 18) Β· Γ—1
  • HFSummary.__init__ (cognitive 18) model/model_training/custom_datasets/summarization.py:176 β€” HFSummary.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 2 (3 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.
D2 Β· Cognitive Complexity Β· AggregateResults.aggregate (cognitive 18) Β· Γ—1
  • AggregateResults.aggregate (cognitive 18) model/model_training/tools/augment_oasst.py:35 β€” AggregateResults.aggregate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (7 pts), error handling 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.
D2 Β· Cognitive Complexity Β· trainer_rl.argument_parsing (cognitive 18) Β· Γ—1
  • trainer_rl.argument_parsing (cognitive 18) model/model_training/trainer_rl.py:25 β€” trainer_rl.argument_parsing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (6 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.
D2 Β· Cognitive Complexity Β· trainer_sft.argument_parsing (cognitive 18) Β· Γ—1
  • trainer_sft.argument_parsing (cognitive 18) model/model_training/trainer_sft.py:169 β€” trainer_sft.argument_parsing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (5 pts), ternaries 1 (2 pts), 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.
D2 Β· Cognitive Complexity Β· TreeManager._enter_state (cognitive 18) Β· Γ—1
  • TreeManager._enter_state (cognitive 18) backend/oasst_backend/tree_manager.py:828 β€” TreeManager._enter_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· UserChatRepository.add_prompter_message (cognitive 18) Β· Γ—1
  • UserChatRepository.add_prompter_message (cognitive 18) inference/server/oasst_inference_server/user_chat_repository.py:114 β€” UserChatRepository.add_prompter_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· chat_chain_utils.similarity (cognitive 18) Β· Γ—1
  • chat_chain_utils.similarity (cognitive 18) inference/worker/chat_chain_utils.py:32 β€” chat_chain_utils.similarity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (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.
D2 Β· Cognitive Complexity Β· PluginsChooser.PluginsChooser (cognitive 18) Β· Γ—1
  • PluginsChooser.PluginsChooser (cognitive 18) website/src/components/Chat/PluginsChooser.tsx:45 β€” PluginsChooser.PluginsChooser has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4, boolean chains 1, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 89, 55, 75). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 Β· Cognitive Complexity Β· index.handler (cognitive 18) Β· Γ—1
  • index.handler (cognitive 18) website/src/pages/api/chat/index.ts:8 β€” index.handler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Utterance.system_tag (cognitive 17) Β· Γ—1
  • Utterance.system_tag (cognitive 17) model/model_training/custom_datasets/formatting.py:57 β€” Utterance.system_tag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· DatasetEntryRm.get_formatted (cognitive 17) Β· Γ—1
  • DatasetEntryRm.get_formatted (cognitive 17) model/model_training/custom_datasets/formatting.py:156 β€” DatasetEntryRm.get_formatted has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, 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.
D2 Β· Cognitive Complexity Β· Gpt4All.process_conversation (cognitive 17) Β· Γ—1
  • Gpt4All.process_conversation (cognitive 17) model/model_training/custom_datasets/prompt_dialogue.py:132 β€” Gpt4All.process_conversation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, 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.
D2 Β· Cognitive Complexity Β· trainer_rm.argument_parsing (cognitive 17) Β· Γ—1
  • trainer_rm.argument_parsing (cognitive 17) model/model_training/trainer_rm.py:131 β€” trainer_rm.argument_parsing has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (5 pts), 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.
D2 Β· Cognitive Complexity Β· pretokenize.parse_args (cognitive 17) Β· Γ—1
  • pretokenize.parse_args (cognitive 17) REDACTED:293 β€” pretokenize.parse_args has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· random_stuff.qna_random_magic (cognitive 17) Β· Γ—1
  • random_stuff.qna_random_magic (cognitive 17) data/datasets/semantics_ws_qna_oa/random_stuff.py:411 β€” random_stuff.qna_random_magic has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· scrape_by_topic.end_to_end_auto_scrape (cognitive 17) Β· Γ—1
  • scrape_by_topic.end_to_end_auto_scrape (cognitive 17) data/datasets/zhihu-kol/scrape_by_topic.py:147 β€” scrape_by_topic.end_to_end_auto_scrape has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (6 pts), boolean chains 2, error handling 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.
D2 Β· Cognitive Complexity Β· DebugClient.send_message (cognitive 17) Β· Γ—1
  • DebugClient.send_message (cognitive 17) inference/text-client/text_client_utils.py:41 β€” DebugClient.send_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (3 pts), loops 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Medium vulnerability Β· Γ—1
  • REDACTED
D32 Β· Data Compliance (PII/GDPR) Β· REDACTED Β· Γ—1
  • REDACTED
D35 Β· Change Coupling Β· Change-coupling hub Β· Γ—1
  • Change-coupling hub: TaskTypes.tsx β†’ label_assistant_reply.tsx, label_initial_prompt.tsx, label_prompter_reply.tsx website/src/components/Tasks/TaskTypes.tsx β€” `website/src/components/Tasks/TaskTypes.tsx` changes together with 3 other files β€” `website/src/pages/label/label_assistant_reply.tsx`, `website/src/pages/label/label_initial_prompt.tsx`, `website/src/pages/label/label_prompter_reply.tsx` β€” 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.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing REDACTED Β· Γ—1
  • REDACTED
D4 Β· Code Duplication Β· Near-duplicate member family (3 members, 11 shared lines) Β· Γ—1
  • Near-duplicate member family (3 members, 11 shared lines) scripts/xor-codec/xor_codec.py:11 β€” scripts/xor-codec/xor_codec.py:11-27 | scripts/xor-codec/xor_codec.py:31-47 | scripts/xor-codec/xor_codec.py:51-67 β€” These 3 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 Β· Code Duplication Β· Near-duplicate member pair (56 shared lines) Β· Γ—1
  • Near-duplicate member pair (56 shared lines) model/model_training/trainer_rm.py:184 β€” model/model_training/trainer_rm.py:184-330 | model/model_training/trainer_sft.py:285-477 β€” These two members are variants of one another: 56 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 Β· Duplicated block (48 lines × 2) Β· Γ—1
  • Duplicated block (48 lines × 2) model/model_training/trainer_rm.py:81 β€” model/model_training/trainer_rm.py:81-128 | model/model_training/trainer_sft.py:119-166 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 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.
D4 Β· Code Duplication Β· Duplicated block (47 lines × 2) Β· Γ—1
  • Duplicated block (47 lines × 2) backend/oasst_backend/utils/ranking.py:83 β€” backend/oasst_backend/utils/ranking.py:83-129 | scripts/postprocessing/rankings.py:83-129 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 Β· Duplicated block (36 lines × 2) Β· Γ—1
  • Duplicated block (36 lines × 2) text-frontend/__main__.py:224 β€” text-frontend/__main__.py:224-259 | text-frontend/__main__.py:266-301 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (33–34 lines × 2) Β· Γ—1
  • Duplicated block (33–34 lines × 2) text-frontend/auto_main.py:103 β€” text-frontend/auto_main.py:103-136 | text-frontend/auto_main.py:221-253 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `text-frontend/auto_main.py:220` calls `_random_message_id` and `text-frontend/auto_main.py:101` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (26–30 lines × 2) Β· Γ—1
  • Duplicated block (26–30 lines × 2) data/datasets/zhihu-kol/convert_parquet.py:7 β€” data/datasets/zhihu-kol/convert_parquet.py:7-36 | data/datasets/zhihu-kol/main.py:159-184 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (23–28 lines × 2) Β· Γ—1
  • Duplicated block (23–28 lines × 2) data/datasets/zhihu-kol/main.py:127 β€” data/datasets/zhihu-kol/main.py:127-154 | data/datasets/zhihu-kol/scrape_by_topic.py:30-52 β€” 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 first that the copies are not typed on the same thing: the declarations holding them bind `qid` to `str` in one and `int` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 Β· Code Duplication Β· Duplicated block (27 lines × 2) Β· Γ—1
  • Duplicated block (27 lines × 2) backend/oasst_backend/utils/ranking.py:25 β€” backend/oasst_backend/utils/ranking.py:25-51 | scripts/postprocessing/rankings.py:25-51 β€” before extracting anything, compare `backend/oasst_backend/utils/ranking.py` and `scripts/postprocessing/rankings.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (26 lines × 2) Β· Γ—1
  • Duplicated block (26 lines × 2) backend/oasst_backend/utils/database_utils.py:201 β€” backend/oasst_backend/utils/database_utils.py:201-226 | backend/oasst_backend/utils/database_utils.py:262-287 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (25–26 lines × 2) Β· Γ—1
  • Duplicated block (25–26 lines × 2) text-frontend/__main__.py:103 β€” text-frontend/__main__.py:103-128 | text-frontend/__main__.py:129-153 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (25 lines × 2) Β· Γ—1
  • Duplicated block (25 lines × 2) backend/oasst_backend/api/v1/admin.py:192 β€” backend/oasst_backend/api/v1/admin.py:192-216 | backend/oasst_backend/api/v1/messages.py:79-103 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (21–24 lines × 3) Β· Γ—1
  • Duplicated block (21–24 lines × 3) backend/export.py:361 β€” backend/export.py:361-384 | oasst-data/examples/filter_messages.py:11-33 | oasst-data/examples/filter_messages.py:61-81 β€” before extracting anything, compare `backend/export.py` and `oasst-data/examples/filter_messages.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/export.py:361` 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.
D4 Β· Code Duplication Β· Duplicated block (22–23 lines × 3) Β· Γ—1
  • Duplicated block (22–23 lines × 3) backend/export.py:322 β€” backend/export.py:322-343 | backend/export.py:366-388 | oasst-data/examples/filter_messages.py:15-37 β€” before extracting anything, compare `backend/export.py` and `oasst-data/examples/filter_messages.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/export.py:322` 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.
D4 Β· Code Duplication Β· Duplicated block (19–22 lines × 4) Β· Γ—1
  • Duplicated block (19–22 lines × 4) text-frontend/__main__.py:58 β€” text-frontend/__main__.py:58-79 | text-frontend/__main__.py:106-125 | text-frontend/__main__.py:132-150 | text-frontend/__main__.py:155-174 β€” all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β€” resolving only two of them leaves the rest to drift apart the first time one is edited. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `text-frontend/__main__.py:130` calls `echo` and `text-frontend/__main__.py:153` 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.
D4 Β· Code Duplication Β· Duplicated block (21–22 lines × 2) Β· Γ—1
  • Duplicated block (21–22 lines × 2) text-frontend/__main__.py:174 β€” text-frontend/__main__.py:174-194 | text-frontend/__main__.py:200-221 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (20–22 lines × 2) Β· Γ—1
  • Duplicated block (20–22 lines × 2) text-frontend/__main__.py:248 β€” text-frontend/__main__.py:248-269 | text-frontend/auto_main.py:201-220 β€” before extracting anything, compare `text-frontend/__main__.py` and `text-frontend/auto_main.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `text-frontend/auto_main.py:221` calls `_random_message_id` and `text-frontend/__main__.py:270` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (20–21 lines × 2) Β· Γ—1
  • Duplicated block (20–21 lines × 2) text-frontend/__main__.py:211 β€” text-frontend/__main__.py:211-230 | text-frontend/auto_main.py:86-106 β€” before extracting anything, compare `text-frontend/__main__.py` and `text-frontend/auto_main.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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.
D4 Β· Code Duplication Β· Duplicated block (20 lines × 2) Β· Γ—1
  • Duplicated block (20 lines × 2) data/datasets/zhihu-kol/scrape_by_topic.py:113 β€” data/datasets/zhihu-kol/scrape_by_topic.py:113-132 | data/datasets/zhihu-kol/scrape_by_topic.py:151-170 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (17–19 lines × 2) Β· Γ—1
  • Duplicated block (17–19 lines × 2) backend/oasst_backend/api/v1/admin.py:104 β€” backend/oasst_backend/api/v1/admin.py:104-120 | backend/oasst_backend/api/v1/admin.py:149-167 β€” 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 `backend/oasst_backend/api/v1/admin.py:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (19 lines × 2) Β· Γ—1
  • Duplicated block (19 lines × 2) model/model_training/custom_datasets/summarization.py:117 β€” model/model_training/custom_datasets/summarization.py:117-135 | model/model_training/custom_datasets/summarization.py:186-204 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (16–18 lines × 2) Β· Γ—1
  • Duplicated block (16–18 lines × 2) model/model_training/trainer_rm.py:211 β€” model/model_training/trainer_rm.py:211-228 | model/model_training/trainer_sft.py:366-381 β€” before extracting anything, compare `model/model_training/trainer_rm.py` and `model/model_training/trainer_sft.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 140 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 `model/model_training/trainer_rm.py:211` 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, `model/model_training/trainer_sft.py:365` calls `get_dataset` and `model/model_training/trainer_rm.py:211` 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.
D4 Β· Code Duplication Β· Duplicated block (17 lines × 3) Β· Γ—1
  • Duplicated block (17 lines × 3) REDACTED:65 β€” REDACTED:65-81 | REDACTED:48-64 | REDACTED:242-258 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (11–17 lines × 2) Β· Γ—1
  • Duplicated block (11–17 lines × 2) model/model_training/metrics.py:31 β€” model/model_training/metrics.py:31-47 | model/model_training/metrics.py:55-65 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (15–16 lines × 2) Β· Γ—1
  • Duplicated block (15–16 lines × 2) backend/oasst_backend/utils/similarity_functions.py:61 β€” backend/oasst_backend/utils/similarity_functions.py:61-75 | backend/oasst_backend/utils/similarity_functions.py:83-98 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 2) Β· Γ—1
  • Duplicated block (16 lines × 2) model/model_training/trainer_sft.py:197 β€” model/model_training/trainer_sft.py:197-212 | REDACTED:320-335 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—1
  • Duplicated block (15 lines × 2) backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:37 β€” backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:37-51 | inference/server/alembic/versions/2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py:29-43 β€” 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 `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:37` 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.
D4 Β· Code Duplication Β· Duplicated block (12–15 lines × 2) Β· Γ—1
  • Duplicated block (12–15 lines × 2) backend/oasst_backend/user_repository.py:216 β€” backend/oasst_backend/user_repository.py:216-227 | backend/oasst_backend/user_repository.py:276-290 β€” 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 `backend/oasst_backend/user_repository.py:216` 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.
D4 Β· Code Duplication Β· Duplicated block (12–14 lines × 2) Β· Γ—1
  • Duplicated block (12–14 lines × 2) backend/oasst_backend/user_repository.py:81 β€” backend/oasst_backend/user_repository.py:81-92 | backend/oasst_backend/user_repository.py: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.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 5) Β· Γ—1
  • Duplicated block (11 lines × 5) backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:40 β€” backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:40-51 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:91-101 | backend/alembic/versions/2023_06_06_1505-c181661eba3a_add_message_revisions.py:29-40 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:116-126 | inference/server/alembic/versions/2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py:32-43 β€” before extracting anything, compare `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py` and `backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:40` 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, `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:127` calls `create_index`, `f` and `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:52` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (2–9 lines × 7) Β· Γ—1
  • Duplicated block (2–9 lines × 7) backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:102 β€” backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:102-103 | backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:73-74 | backend/alembic/versions/2023_01_08_2208-92a367bb9f40_restructure_message_tree_state_table.py:32-39 | backend/alembic/versions/2023_01_15_1139-423557e869e4_add_indices_for_created_date.py:19-20 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:51-58 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:119-127 | inference/server/alembic/versions/2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py:36-44 β€” there are 7 copies across 6 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `backend/alembic/versions/2023_01_08_2208-92a367bb9f40_restructure_message_tree_state_table.py:32` 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, `backend/alembic/versions/2023_01_15_1139-423557e869e4_add_indices_for_created_date.py:21` calls `create_index`, `f` and `backend/alembic/versions/2023_01_08_2208-92a367bb9f40_restructure_message_tree_state_table.py:44` 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.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 3) Β· Γ—1
  • Duplicated block (8 lines × 3) model/model_training/check_dataset_counts.py:102 β€” model/model_training/check_dataset_counts.py:102-109 | model/model_training/trainer_sft.py:229-236 | REDACTED:343-350 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made 3 times.
D4 Β· Code Duplication Β· Duplicated block (6–8 lines × 2) Β· Γ—1
  • Duplicated block (6–8 lines × 2) backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:22 β€” backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:22-29 | backend/alembic/versions/2023_02_07_1922-caee1e8ee0bc_added_new_table_for_flagged_messages.py:21-26 β€” 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 `backend/alembic/versions/2022_12_27_1444-3358eb6834e6_add_journal_table.py:22` 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.
D4 Β· Code Duplication Β· Duplicated block (6–7 lines × 2) Β· Γ—1
  • Duplicated block (6–7 lines × 2) backend/oasst_backend/tree_manager.py:511 β€” backend/oasst_backend/tree_manager.py:511-516 | backend/oasst_backend/tree_manager.py:562-568 β€” 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (2–6 lines × 4) Β· Γ—1
  • Duplicated block (2–6 lines × 4) inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:25 β€” inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:25-26 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:36-37 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:133-138 | inference/server/alembic/versions/2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py:27-32 β€” 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, `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:131` calls `Column`, `AutoString` and `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:23` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 4) Β· Γ—1
  • Duplicated block (5 lines × 4) backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:19 β€” backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:19-23 | backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:33-37 | backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:141-145 | backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py:155-159 β€” before extracting anything, compare `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py` and `backend/alembic/versions/2022_12_16_0000-cd7de470586e_v1_db_structure.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `backend/alembic/versions/2022_12_15_0000-23e5fea252dd_first_revision.py:19` 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.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 7) Β· Γ—1
  • Duplicated block (7 lines × 7) backend/alembic/versions/2022_12_29_2103-464ec4667aae_add_collective_flag_to_task.py:20 β€” backend/alembic/versions/2022_12_29_2103-464ec4667aae_add_collective_flag_to_task.py:20-28 | backend/alembic/versions/2022_12_30_0109-73ce3675c1f5_add_field_trusted_api_client.py:20-26 | backend/alembic/versions/2022_12_31_0438-8d269bc4fdbd_add_deleted_field_to_post.py:20-26 | backend/alembic/versions/2023_01_27_2013-f856bf19d32b_add_user_show_on_leaderboard.py:20-28 | inference/server/alembic/versions/2023_04_12_2033-f0e18084aae4_add_deleted_field_to_user.py:20-26 | inference/server/alembic/versions/2023_04_14_1611-b66fd8f9da1f_add_hidden_field_to_chats.py:20-26 | inference/server/alembic/versions/2023_04_24_2130-401eef162771_add_chat_data_opt_out_field.py:20-26 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 3) Β· Γ—1
  • Duplicated block (10 lines × 3) data/datasets/mt_note_generation/mt_note_generation.py:112 β€” data/datasets/mt_note_generation/mt_note_generation.py:112-121 | data/datasets/soda_synthetic_dialogue/soda_synthetic_dialogue.py:97-107 | data/datasets/youtube_subs_howto100M/youtube_subs_howto100M.py:99-108 β€” 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 3) Β· Γ—1
  • Duplicated block (5 lines × 3) inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:43 β€” inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:43-47 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:59-63 | inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:128-132 β€” 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 `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:43` 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, `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:126` calls `create_index`, `f` and `inference/server/alembic/versions/2023_03_12_1742-7d5be54acd49_initial_revision.py:42` 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.
R10 Β· Code Duplication Β· Duplicated block (19 lines × 2 locations) Β· Γ—1
  • Duplicated block (19 lines × 2 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:223 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:223 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:171 β€” 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 (19 lines × 3 locations) Β· Γ—1
  • Duplicated block (19 lines × 3 locations) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:48 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:48 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:69 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:98 β€” 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 (18 lines × 2 locations) Β· Γ—1
  • Duplicated block (18 lines × 2 locations) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:360 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:360 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/task.ts:118 β€” 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 (17 lines × 3 locations) Β· Γ—1
  • Duplicated block (17 lines × 3 locations) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:269 β€” discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:269 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:308 · discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:326 β€” 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.
R10 Β· Code Duplication Β· Duplicated block (15 lines × 3 locations) Β· Γ—1
  • Duplicated block (15 lines × 3 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:57 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:57 · discord-bots/oa-bot-js/src/interactions/tasks.ts:74 · discord-bots/oa-bot-js/src/interactions/tasks.ts:132 β€” all 3 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 Β· Code Duplication Β· Duplicated block (14 lines × 2 locations) Β· Γ—1
  • Duplicated block (14 lines × 2 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:152 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:152 · discord-bots/oa-bot-js/src/interactions/tasks.ts:277 β€” all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 Β· Code Duplication Β· Duplicated block (13 lines × 2 locations) Β· Γ—1
  • Duplicated block (13 lines × 2 locations) discord-bots/oa-bot-js/src/interactions/vote.ts:31 β€” discord-bots/oa-bot-js/src/interactions/vote.ts:31 · discord-bots/oa-bot-js/src/interactions/vote.ts:45 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
R10 Β· Code Duplication Β· Duplicated block (12 lines × 3 locations) Β· Γ—1
  • Duplicated block (12 lines × 3 locations) discord-bots/oa-bot-js/src/interactions/tasks.ts:88 β€” discord-bots/oa-bot-js/src/interactions/tasks.ts:88 · discord-bots/oa-bot-js/src/interactions/tasks.ts:152 · discord-bots/oa-bot-js/src/interactions/tasks.ts:273 β€” all 3 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 Β· Code Duplication Β· Duplicated block (6 lines × 4 locations) Β· Γ—1
  • Duplicated block (6 lines × 4 locations) discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:82 β€” discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:82 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:88 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:94 · discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:100 β€” all 4 copies are in the same file, and the CITED SPAN is not a self-contained block β€” it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β€” the whole function, component or branch these lines sit in β€” and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 Β· Cyclomatic Complexity Β· Complex function execute (cyclomatic 30, cognitive 60) Β· Γ—1
  • Complex function execute (cyclomatic 30, cognitive 60) discord-bots/oa-bot-js/src/interactions/tasks.ts:41 β€” execute has cyclomatic complexity 30 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 labelInteraction (cyclomatic 27, cognitive 48) Β· Γ—1
  • Complex function labelInteraction (cyclomatic 27, cognitive 48) discord-bots/oa-bot-js/src/modules/open-assistant/interactions/label.ts:18 β€” labelInteraction has cyclomatic complexity 27 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic Complexity Β· Complex function execute (cyclomatic 16, cognitive 26) Β· Γ—1
  • Complex function execute (cyclomatic 16, cognitive 26) discord-bots/oa-bot-js/src/events/messages.ts:34 β€” execute has cyclomatic complexity 16 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic Complexity Β· Complex function execute (cyclomatic 14, cognitive 22) Β· Γ—1
  • Complex function execute (cyclomatic 14, cognitive 22) discord-bots/oa-bot-js/src/commands/chat.ts:61 β€” execute has cyclomatic complexity 14 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β€” extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic Complexity Β· Complex function labelText (cyclomatic 14, cognitive 13) Β· Γ—1
  • Complex function labelText (cyclomatic 14, cognitive 13) discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:66 β€” labelText has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β€” arms side by side rather than stacked β€” and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic Complexity Β· Complex function getLabels (cyclomatic 11, cognitive 9) Β· Γ—1
  • Complex function getLabels (cyclomatic 11, cognitive 9) discord-bots/oa-bot-js/src/modules/open-assistant/labels.ts:114 β€” getLabels has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β€” arms side by side rather than stacked β€” and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R4 Β· Test Coverage Β· Test Coverage Β· Γ—1
  • Test Coverage β€” 0% of 31 production file(s) reachable from 0 test file(s) via the import graph β€” 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R5 Β· Dependency Freshness Β· Dependency Freshness Β· Γ—1
  • Dependency Freshness β€” 89 outdated package(s); JS/npm CVEs scored in D30
R7 Β· Dead Code Β· Dead file (~55 LoC) Β· Γ—1
  • Dead file (~55 LoC) discord-bots/oa-bot-js/src/handlers/commands.ts β€” no import path from any entry point (12 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (discord-bots/oa-bot-js/src/bot.ts) β€” every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 Β· Dead Code Β· Dead file (~41 LoC) Β· Γ—1
  • Dead file (~41 LoC) discord-bots/oa-bot-js/src/bot.ts β€” no import path from any entry point (12 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it β€” nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 Β· Dead Code Β· Dead file (~34 LoC) Β· Γ—1
  • Dead file (~34 LoC) discord-bots/oa-bot-js/src/handlers/interactions.ts β€” no import path from any entry point (12 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (discord-bots/oa-bot-js/src/bot.ts) β€” every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 Β· Dead Code Β· Dead file (~27 LoC) Β· Γ—1
  • Dead file (~27 LoC) discord-bots/oa-bot-js/src/handlers/events.ts β€” no import path from any entry point (12 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (discord-bots/oa-bot-js/src/bot.ts) β€” every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 Β· Dead Code Β· Dead file (~0 LoC) Β· Γ—1
  • Dead file (~0 LoC) discord-bots/oa-bot-js/src/modules/inference/index.ts β€” no import path from any entry point (12 application, 1 tooling, 0 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
X3 Β· Exception handling Β· Swallowed exception (caught, then discarded) Β· Γ—1
  • Swallowed exception (caught, then discarded) inference/worker/work.py:182 β€” `except 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.
Minor β€” 252 finding(s)
D34 Β· Knowledge Freshness Β· Orphaned file Β· Γ—177
  • Orphaned file model/model_training/models/prefix_llama.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file model/model_training/utils/ppo_utils.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/oasst_backend/user_stats_repository.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file data/datasets/semantics_ws_qna_oa/random_stuff.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file discord-bots/oa-bot-py/bot/extensions/work.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/worker/chat_chain.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/server/oasst_inference_server/routes/workers.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file model/model_training/trainer_sft.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/alembic/versions/2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scripts/data_augment/data_augment.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file model/model_training/utils/utils.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file oasst-shared/oasst_shared/schemas/protocol.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/export.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/oasst_backend/user_repository.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/server/oasst_inference_server/routes/chats.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/worker/chat_chain_utils.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/server/oasst_inference_server/user_chat_repository.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/main.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file model/model_eval/manual/sampling_report.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/oasst_backend/api/v1/messages.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file text-frontend/__main__.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file inference/worker/work.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file model/model_training/trainer_rm.py:1 β€” No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 152 more in this group β€” see findings.md.
P2 Β· Observability Β· Console output used as the logging channel Β· Γ—15
  • Console output used as the logging channel website/src/pages/api/report.ts:18 β€” `website/src/pages/api/report.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/api/set_label.ts:33 β€” `website/src/pages/api/set_label.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/api/update_task.ts:56 β€” `website/src/pages/api/update_task.ts` reports through `console.*` at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/api/new_task/[task_type].ts:31 β€” `website/src/pages/api/new_task/[task_type].ts` reports through `console.*` at line 31 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/api/messages/[id]/emoji.ts:22 β€” `website/src/pages/api/messages/[id]/emoji.ts` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/api/account/delete.ts:50 β€” `website/src/pages/api/account/delete.ts` reports through `console.*` at line 50 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/account/delete.tsx:24 β€” `website/src/pages/account/delete.tsx` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/account/edit.tsx:47 β€” `website/src/pages/account/edit.tsx` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/pages/account/paperack.tsx:27 β€” `website/src/pages/account/paperack.tsx` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/lib/chat_stream.ts:59 β€” `website/src/lib/chat_stream.ts` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/lib/chat_stream.ts:62 β€” `website/src/lib/chat_stream.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/lib/oasst_inference_client.ts:132 β€” `website/src/lib/oasst_inference_client.ts` reports through `console.*` at line 132 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/hooks/tasks/useGenericTaskAPI.tsx:51 β€” `website/src/hooks/tasks/useGenericTaskAPI.tsx` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/components/Tasks/Task/Task.tsx:143 β€” `website/src/components/Tasks/Task/Task.tsx` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel website/src/components/Chat/ChatConversation.tsx:255 β€” `website/src/components/Chat/ChatConversation.tsx` reports through `console.*` at line 255 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—10
  • Duplicated predicate website/src/lib/oasst_inference_client.ts:49 β€” `err instanceof AxiosError && err.response.status === 404` appears character-identically in 2 files β€” website/src/lib/oasst_inference_client.ts, website/src/pages/api/account/delete.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate website/src/pages/api/messages/[id]/tree.ts:9 β€” `token.role === ROLES.ADMIN || token.role === ROLES.MODERATOR` appears character-identically in 2 files β€” website/src/pages/api/messages/[id]/tree.ts, website/src/pages/api/user_stats.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate website/src/hooks/message/useDeleteMessage.ts:11 β€” `typeof key === "string" && (key.startsWith("/api/messages") || key.startsWith("/api/admin/messages"))` appears character-identically in 2 files β€” website/src/hooks/message/useDeleteMessage.ts, website/src/hooks/message/useUndeleteMessage.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate inference/server/oasst_inference_server/plugin_utils.py:29 β€” `"application/yaml" in content_type or "application/x-yaml" in content_type or url.endswith(".yaml") or url.endswith(".yml")` appears character-identically in 2 files β€” inference/server/oasst_inference_server/plugin_utils.py, inference/worker/openapi_parser.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate model/model_eval/eval_rm.py:75 β€” `args.get("max_length") or model.config.max_position_embeddings` appears character-identically in 3 files β€” model/model_eval/eval_rm.py, model/model_eval/rejection_sampling.py, model/model_eval/sampling_score.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate model/model_training/trainer_rm.py:90 β€” `is_datasets_available() and isinstance(train_dataset, datasets.Dataset)` appears character-identically in 2 files β€” model/model_training/trainer_rm.py, model/model_training/trainer_sft.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate model/model_training/trainer_rm.py:185 β€” `not training_conf.deepspeed or training_conf.local_rank == 0` appears character-identically in 2 files β€” model/model_training/trainer_rm.py, model/model_training/trainer_sft.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/oasst_backend/api/v1/admin.py:229 β€” `qry_max_count > max_count and num_rows == qry_max_count` appears character-identically in 3 files β€” backend/oasst_backend/api/v1/admin.py, backend/oasst_backend/api/v1/messages.py, backend/oasst_backend/api/v1/users.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate text-frontend/__main__.py:233 β€” `task["mode"] == "simple" and len(valid_labels) == 1` appears character-identically in 2 files β€” text-frontend/__main__.py, text-frontend/auto_main.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate model/model_training/trainer_rm.py:213 β€” `training_conf.verbose or training_conf.show_dataset_stats` appears character-identically in 2 files β€” model/model_training/trainer_rm.py, model/model_training/trainer_sft.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X4 Β· Structured logging Β· Interpolated log message defeats structured logging Β· Γ—6
  • Interpolated log message defeats structured logging website/src/pages/api/account/delete.ts:25 β€” `info` at line 25 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging website/src/pages/api/account/delete.ts:34 β€” `info` at line 34 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging website/src/pages/api/account/delete.ts:39 β€” `info` at line 39 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging website/src/pages/api/account/delete.ts:48 β€” `info` at line 48 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string β€” the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging data/datasets/nsfw_selfharm_reddit/utils/reddit.py:40 β€” `error` at line 40 is handed an f-string as its message, 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 record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging data/datasets/nsfw_selfharm_reddit/utils/reddit.py:77 β€” `error` at line 77 is handed an f-string as its message, 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 record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
D31 Β· IaC & Container Security Β· Low IaC Β· Γ—5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 Β· Knowledge Freshness Β· Most significant orphaned file Β· Γ—3
  • Most significant orphaned file REDACTED:1 β€” One of the orphaned files carrying the most lost knowledge β€” ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file backend/oasst_backend/tree_manager.py:1 β€” One of the orphaned files carrying the most lost knowledge β€” ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file backend/oasst_backend/prompt_repository.py:1 β€” One of the orphaned files carrying the most lost knowledge β€” ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
DM2 Β· Strongly-typed ids Β· Primitive id on a domain type Β· Γ—3
  • Primitive id on a domain type: Message.message_tree_id backend/oasst_backend/models/message.py:18 β€” `Message.message_tree_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that.
  • Primitive id on a domain type: Message.api_client_id backend/oasst_backend/models/message.py:18 β€” `Message.api_client_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that.
  • Primitive id on a domain type: User.api_client_id backend/oasst_backend/models/user.py:11 β€” `User.api_client_id` is a raw `UUID` β€” give it a strongly-typed id: a dedicated single-field type wrapping the `UUID`, in whatever form your language spells that.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—2
  • REDACTED
  • REDACTED
C2 Β· Access Controls Β· No named authorization policies Β· Γ—1
  • No named authorization policies β€” Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) β€” this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
C4 Β· Data Retention Β· Partial data-retention evidence Β· Γ—1
  • Partial data-retention evidence β€” A retention mechanism is present, but the data-lifecycle is not yet complete β€” missing: an expiry limit β€” a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
C5 Β· Data-Subject Rights Β· Partial data-subject-rights support Β· Γ—1
  • Partial data-subject-rights support β€” Corroborated rights: erasure βœ“ · export βœ— · consent βœ—. Each tick means this scan found code in the repository implementing that right β€” a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A βœ— therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion β€” 4 of 23 project(s) overshoot their size bounds, lowering Project Cohesion to 6.9/10. The most over is `website` (16322 LoC, 350 module-visible types across 73 directories). 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.
D28 Β· Secrets (history) Β· Rotate the exposed credentials Β· Γ—1
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D34 Β· Knowledge Freshness Β· Dormant codebase Β· Γ—1
  • Dormant codebase β€” 180 of 180 significant files have no living knowledge β€” the codebase as a whole is dormant, not 180 separate risks. Counted over 180 of the 362 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
M2 Β· Architecture documentation Β· No ADRs Β· Γ—1
  • No ADRs β€” No Architecture Decision Records found β€” no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 Β· Folder & project structure Β· No src/ separation Β· Γ—1
  • No src/ separation β€” Production code isn't grouped under a src/ folder β€” it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P2 Β· Observability Β· Logging is not universal Β· Γ—1
  • Logging is not universal β€” Only 11/17 runnable modules use logging (modules with no entry point or server are excluded β€” they are libraries a runnable module hosts). Silent: `data/datasets/biostars_qa`, `data/datasets/iapp_wiki_qa_squad`, `data/datasets/logicreference_OA`, `model/model_eval/manual`, `model/pretokenizer` and 1 more.
P3 Β· Security & performance tooling Β· No SAST Β· Γ—1
  • No SAST β€” No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 18306 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen β€” if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 Β· Release Hygiene Β· No changelog Β· Γ—1
  • No changelog β€” No CHANGELOG/HISTORY/RELEASES file β€” what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 Β· Dead Code Β· Unused export 'InferenceTokens' Β· Γ—1
  • Unused export 'InferenceTokens' discord-bots/oa-bot-js/src/modules/inference/types.ts:14 β€” Nothing imports this binding β€” it is safe to review for removal.
R7 Β· Dead Code Β· Unused export 'GetChatsResponse' Β· Γ—1
  • Unused export 'GetChatsResponse' discord-bots/oa-bot-js/src/modules/inference/types.ts:47 β€” Nothing imports this binding β€” it is safe to review for removal.
R7 Β· Dead Code Β· Unused export 'InferenceEvent' Β· Γ—1
  • Unused export 'InferenceEvent' discord-bots/oa-bot-js/src/modules/inference/types.ts:73 β€” Nothing imports this binding β€” it is safe to review for removal.
R7 Β· Dead Code Β· Unused export 'ChatConfigForm' Β· Γ—1
  • Unused export 'ChatConfigForm' discord-bots/oa-bot-js/src/modules/inference/types.ts:100 β€” Nothing imports this binding β€” it is safe to review for removal.
R7 Β· Dead Code Β· Unused module-local declaration 'sleep' Β· Γ—1
  • Unused module-local declaration 'sleep' discord-bots/oa-bot-js/src/commands/chat.ts:190 β€” 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.
S1 Β· Web-Security Posture Β· No security response headers detected Β· Γ—1
  • No security response headers detected deploy/prod2-node/nginx/nginx.conf:3 β€” 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 configured β€” defense in depth, even when a reverse proxy could set them. This is reported because `REDACTED` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (βˆ’2.0 on this card.)
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 1/3 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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 Β· Strict null checking is not enabled everywhere the repository type-checks Β· Γ—1
  • Strict null checking is not enabled everywhere the repository type-checks β€” 0/3 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 Β· Nullable reference types Β· Null assertions (`!`) reduce the strict null checking score Β· Γ—1
  • Null assertions (`!`) reduce the strict null checking score β€” ~2.0 `!` null assertions per 1k TypeScript source lines β€” 41 assertion(s) across the 20766 source line(s) of the 324 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: website/src/components/Messages/LabelInputGroup.tsx (10), website/src/components/Chat/ChatConversation.tsx (6), website/src/components/Chat/ChatConfigForm.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
X7 Β· Silent fallback defaults Β· Silent fallback default in catch Β· Γ—1
  • Silent fallback default in catch website/src/pages/api/auth/[...nextauth].ts:253 β€” `getIp` swallows every exception into `return ""` β€” a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor β€” 158 finding(s)
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—158
  • Outdated: aiohttp β€” `aiohttp` is pinned to 3.8.3, but 3.14.5 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 3.8.3 until the declaration is edited.
  • Outdated: aiosignal β€” `aiosignal` is pinned to 1.3.1, but 1.4.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.3.1 until the declaration is edited.
  • Outdated: aiosqlite β€” `aiosqlite` is pinned to 0.18.0, but 0.22.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.18.0 until the declaration is edited.
  • Outdated: alembic β€” `alembic` is pinned to 1.8.1, but 1.20.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.8.1 until the declaration is edited.
  • Outdated: anyio β€” `anyio` is pinned to 3.6.2, but 4.15.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 3.6.2 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: argon2-cffi β€” `argon2-cffi` is pinned to 21.3.0, but 25.1.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 21.3.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: argon2-cffi-bindings β€” `argon2-cffi-bindings` is pinned to 21.2.0, but 26.1.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 21.2.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: arrow β€” `arrow` is pinned to 1.2.3, but 1.4.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.2.3 until the declaration is edited.
  • Outdated: asgiref β€” `asgiref` is pinned to 3.6.0, but 3.13.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 3.6.0 until the declaration is edited.
  • Outdated: asttokens β€” `asttokens` is pinned to 2.2.1, but 3.0.2 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.2.1 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: async-timeout β€” `async-timeout` is pinned to 4.0.2, but 5.0.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 4.0.2 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: attrs β€” `attrs` is pinned to 22.2.0, but 26.1.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 22.2.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: beautifulsoup4 β€” `beautifulsoup4` is pinned to 4.11.2, but 4.15.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 4.11.2 until the declaration is edited.
  • Outdated: bleach β€” `bleach` is pinned to 6.0.0, but 6.4.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 6.0.0 until the declaration is edited.
  • Outdated: bs4 β€” `bs4` is pinned to 0.0.1, but 0.0.2 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.0.1 until the declaration is edited.
  • Outdated: cachetools β€” `cachetools` is pinned to 5.3.0, but 7.2.5 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 5.3.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: celery β€” `celery` is pinned to 5.2.0, but 5.6.3 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 5.2.0 until the declaration is edited.
  • Outdated: cffi β€” `cffi` is pinned to 1.15.1, but 2.1.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.15.1 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: charset-normalizer β€” `charset-normalizer` is pinned to 3.0.1, but 3.5.2 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 3.0.1 until the declaration is edited.
  • Outdated: comm β€” `comm` is pinned to 0.1.2, but 0.2.3 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.1.2 until the declaration is edited.
  • Outdated: contourpy β€” `contourpy` is pinned to 1.0.6, but 1.4.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.0.6 until the declaration is edited.
  • Outdated: cryptography β€” `cryptography` is pinned to 41.0.0, but 50.0.2 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 41.0.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: cycler β€” `cycler` is pinned to 0.11.0, but 0.12.1 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 0.11.0 until the declaration is edited.
  • Outdated: datasets β€” `datasets` is pinned to 2.10.0, but 5.1.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.10.0 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: debugpy β€” `debugpy` is pinned to 1.6.6, but 1.8.22 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.6.6 until the declaration is edited.
  • + 133 more in this group β€” see findings.md.

Appendix B β€” Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension β€” the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative β€” never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json β€” kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-79ef2c2996444f68bead6c0614d30a4f/history.json --exit-code 0 --source .7artifacts/raw/gitleaks-history.json
D28 Β· Secrets (history)gitleaksβ€”gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-79ef2c2996444f68bead6c0614d30a4f/tree.json --exit-code 0 --source .4artifacts/raw/gitleaks-tree.json
D29 Β· Static Analysis (SAST)semgrepβ€”semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude data/datasets/grade_school_math_instructions --exclude data/datasets/tell_a_joke --exclude notebooks/data-augmentation/writing-prompt/.ipynb_checkpoints --exclude website/.storybook .59artifacts/raw/semgrep.json
D30 Β· Dependency Vulnerabilitiestrivyβ€”trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update48artifacts/raw/trivy-fs.json
D31 Β· IaC & Container Securitytrivyβ€”trivy config --format json --quiet .61artifacts/raw/trivy-config.json
D32 Β· Data Compliance (PII/GDPR)semgrepβ€”semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude data/datasets/grade_school_math_instructions --exclude data/datasets/tell_a_joke --exclude notebooks/data-augmentation/writing-prompt/.ipynb_checkpoints --exclude website/.storybook .9artifacts/raw/semgrep-gdpr.json
D37 Β· Vulnerability-disclosure Policydisclosureβ€”disclosure: not applicable β€” No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0β€”
D40 Β· Network Egress Confinementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0β€”
D41 Β· Kernel & Syscall Confinementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0β€”
D42 Β· Runtime Threat Enforcementruntime-hardeningβ€”runtime-hardening: not applicable β€” No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0β€”
D43 Β· Malicious Dependenciestrivyβ€”trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a172ce-ed23-72ae-a824-3a0ddbfa4083 Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric β€” drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

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