Repository navigation
Reduce cognitive complexity in 10 SonarCloud critical issues - #1434
Conversation
Extract helpers in quests, storage, game-version, library-scanner, restore, transmission, rss and steam-playtime without changing behavior. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RP6NCUc3nNkDKKQpeeN4DB
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The "Milestone is set" check fails because this PR has no milestone. It is unrelated to the code change. I can't set one from this session and the right release milestone is a maintainer's call, so a maintainer needs to assign it. The Codex review also failed because the Codex usage limit was reached, so it did not review the change. Generated by Claude Code |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
CI failed: The 'Milestone is set' CI job failed because the pull request has no milestone assigned, a PR metadata requirement the analyzer judged unrelated to the refactoring change. Assigning a milestone and rerunning should resolve it.OverviewThe 'Milestone is set' CI job failed because the pull request has no milestone assigned, a PR metadata requirement the analyzer judged unrelated to the refactoring change. Assigning a milestone and rerunning should resolve it. FailuresMilestone is set check failed: no milestone assigned to PR (unrelated to change)
Summary
Code Review ✅ Approved 🟢 Low riskThe changes extract existing server and shared-code logic into helpers, with the supplied implementations preserving behavior and no meaningful impact. Refactors cognitive complexity in 10 SonarCloud critical issues across shared, server, and downloader code by extracting helpers such as VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
📊 Automated PR Analysis
SummaryThis PR refactors 10 server/shared TypeScript functions to reduce cognitive complexity, addressing 10 of 115 open SonarCloud Critical issues (typescript:S3776) by extracting helper functions, without changing behavior. The targeted files include game-version.ts, library-scanner.ts, transmission.ts, rss.ts, steam-playtime.ts, and others. Review Checklist
Analyzed automatically by wshm · This is an automated analysis, not a human review. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |



Description
Fixes 10 of the 115 open Critical SonarCloud issues on
main(alltypescript:S3776, cognitive complexity above 15; there are no Blockers). I picked the ten with the smallest overshoot (16–17 against the limit of 15) in server/shared code. Each fix extracts helpers and does not change behavior.shared/quests.tsquestProgresscountTouchedhelper replaces two duplicated loopsserver/storage.tsupdateGameStatusisSyncBlockedguardserver/game-version.tsrecordVersionFromCompletedDownloadwriteReleaseVersioncompare-and-set helperserver/game-version.tsrecordVersionFromInstallFoldershouldWriteInstallVersionhelperserver/library-scanner.tsmatchUnmatchedFolderupsertMatchedGamehelperserver/library-scanner.tsprocessCandidateassignToExistingGamehelperserver/backup/restore.tsparseManifestassertManifestCompletehelperserver/downloaders/transmission.tsmakeRequestretryWithSessionIdmethodserver/rss.tsfetchFeedbackfillLinksmethodserver/steam-playtime.tsplanSteamImportfetchSteamTotalsandgroupByhelpers105 Critical issues remain, mostly larger refactors (e.g.
ImportManager.tsat complexity 55).Screenshots
Backend-only change, no UI touched.
Type of change
Checklist:
tscand ESLint cleanclaude-sonnet-5-5), default thinking level.Generated by Claude Code
Summary by CodeRabbit