Jetpack Code Quality Findings
JetPack Code Quality Findings
Research compiled: 2026-02-16 Source: code-quality-bot automated analysis (ran 2026-02-16)
Overview
The code-quality-bot ran automated analysis against FO.JetPack.4x.FrontEnd on Feb 16, 2026. It found 10 actionable issues across 4 categories. Two have already been branched and are ready for PR.
Branches Created
| Branch | Category | Impact | Files Changed |
|---|---|---|---|
cqb/reliability/unsafe-force-casts-nscoding |
reliability | HIGH | UserServiceModel.swift (+14 lines) |
cqb/reliability/unsafe-json-force-cast |
reliability | HIGH | WebServiceProxy.swift (+23 lines) |
All Findings
Reliability (5 issues, all HIGH)
- unsafe-force-casts-nscoding -- 11
as!casts in UserServiceModel NSCoding decode (lines 74-85). SwiftLint disabled for force_cast. [BRANCHED] - unsafe-json-force-cast --
as! NSDictionaryin WebServiceProxy POST (line 147). GET handles both types safely. [BRANCHED] - unsafe-force-cast-httpcache --
as! HTTPURLResponsein DiskCache (line 25). [NEEDS BRANCH] - unsafe-force-unwraps-dates -- 4 force unwraps in NSDateExtensions (lines 384, 421, 479, 485). [NEEDS BRANCH]
- unsafe-force-try-reachability --
try!in LoginViewController (line 66). [NEEDS BRANCH]
Reliability (1 issue, MEDIUM)
- silent-error-swallowing-scheduling -- SchedulingService (lines 29, 34, 46) force unwraps URL and swallows errors with
try?. [NEEDS BRANCH]
Quality (1 issue, MEDIUM)
- production-print-statements -- 25
print()statements across 5 files. DatabaseManager has 11 alone. [NEEDS BRANCH]
Modernize (3 issues)
- modernize-fitforduty-observable (LOW) -- FitForDutyViewModel uses legacy ObservableObject + @Published. Candidate for @Observable macro.
- modernize-webservice-async (MEDIUM) -- WebServiceProxy GET/POST use completion handlers. Central networking code should be async/await.
- modernize-mainactor-airtalk (LOW) -- DispatchQueue.main.async in AirTalkConversationsManager (line 473). Should be @MainActor.
Recent Manual Fixes (from Water Cooler Chat)
| Date | What | Branch |
|---|---|---|
| 2026-02-13 | Fixed OFF Time showing before departure (#1437886) | (on develop) |
| 2026-02-13 | Fixed 16 MainActor concurrency warnings across 6 files | jn/refactor/fixMainActor |
| 2026-02-16 | Fixed hotel/overnight schedule display (midnight GMT bug) | jn/bugfix/hotel-schedule |
Known Technical Debt (from summaries)
- Large ApplicationRootViewModel -- needs decomposition
- Mixed CoreData + SwiftData persistence -- migration in progress
- AppDelegate pattern -- needs migration to SwiftUI App lifecycle
- Flat file structure -- 359 items at root of MobileOpsPilotApp/ (no subdirectory organization)
- Some force unwrapping -- being addressed by code-quality-bot
- Dual JSON libraries on backend -- Newtonsoft + System.Text.Json
- Dual EF versions on backend -- EF Core 7 + EF 6.5.1
- Legacy WCF services on backend
Code Quality Infrastructure
- SwiftLint -- Fails build on violations (frontend)
- SonarQube -- Quality gate in CI/CD (project key:
flightops-JetPack) - code-quality-bot -- Automated daily analysis at 7AM, creates branches for findings
- 4 environments with full pipeline: TEST -> QA -> STAGING -> PROD (backend), 5 environments for frontend (+ BETA)